Class 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 Detail

      • GoogleAuthUtils

        public GoogleAuthUtils()
    • 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