Package com.google.auth.oauth2
Class GoogleAuthUtils
- java.lang.Object
-
- com.google.auth.oauth2.GoogleAuthUtils
-
public class GoogleAuthUtils extends java.lang.Object
This public class provides shared utilities for common OAuth2 utils or ADC. It also exposes convenience methods such as a getter for well-known Application Default Credentials file path
-
-
Constructor Summary
Constructors Constructor Description GoogleAuthUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static java.io.File
getWellKnownCredentialsFile(DefaultCredentialsProvider provider)
Platform-independent logic to obtain the well-known Application Default Credentials filestatic java.lang.String
getWellKnownCredentialsPath()
Gets the path to the well-known Application Default Credentials file location(package private) static java.lang.String
getWellKnownCredentialsPath(DefaultCredentialsProvider provider)
Testing version of getWellKnownCredentialsPath() that uses a custom provider
-
-
-
Method Detail
-
getWellKnownCredentialsPath
public static final java.lang.String getWellKnownCredentialsPath()
Gets the path to the well-known Application Default Credentials file location- Returns:
- the path to the well-known Application Default Credentials file location
-
getWellKnownCredentialsPath
static final java.lang.String getWellKnownCredentialsPath(DefaultCredentialsProvider provider)
Testing version of getWellKnownCredentialsPath() that uses a custom provider- Returns:
- the path to the well-known Application Default Credentials file location
-
getWellKnownCredentialsFile
static final java.io.File getWellKnownCredentialsFile(DefaultCredentialsProvider provider)
Platform-independent logic to obtain the well-known Application Default Credentials file- Parameters:
provider
- the provider used to resolve env and system properties (exposed for testing purposes)- Returns:
- the well-known Application Default Credentials file
-
-