Class GoogleServiceAccountCredentialFetcher

    • Constructor Detail

      • GoogleServiceAccountCredentialFetcher

        public GoogleServiceAccountCredentialFetcher()
        Constructor.
      • GoogleServiceAccountCredentialFetcher

        public GoogleServiceAccountCredentialFetcher​(String credentialJson)
        Constructor.
        Parameters:
        credentialJson - A string containing service account credential file JSON blob.
    • Method Detail

      • getCredentials

        public com.google.auth.oauth2.GoogleCredentials getCredentials()
                                                                throws IOException
        Description copied from interface: CredentialFetcher
        Fetch credentials.
        Specified by:
        getCredentials in interface CredentialFetcher
        Returns:
        A set of credentials to access the API.
        Throws:
        IOException - If there is an exception fetching credentials.