Package com.google.auth.oauth2
Class GoogleAuthUtils
java.lang.Object
com.google.auth.oauth2.GoogleAuthUtils
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 -
Method Summary
Modifier and TypeMethodDescription(package private) static final File
Platform-independent logic to obtain the well-known Application Default Credentials filestatic final String
Gets the path to the well-known Application Default Credentials file location(package private) static final String
Testing version of getWellKnownCredentialsPath() that uses a custom provider
-
Constructor Details
-
GoogleAuthUtils
public GoogleAuthUtils()
-
-
Method Details
-
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
Testing version of getWellKnownCredentialsPath() that uses a custom provider- Returns:
- the path to the well-known Application Default Credentials file location
-
getWellKnownCredentialsFile
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
-