public class DefaultCredentialsProvider extends Object implements com.google.api.gax.core.CredentialsProvider
CredentialsProvider
implementation that wraps credentials based on
user-provided properties and defaults.Constructor and Description |
---|
DefaultCredentialsProvider(CredentialsSupplier credentialsSupplier)
The credentials provided by this object originate from the following sources:
*.credentials.location: Credentials built from JSON content inside the file pointed
to by this property,
*.credentials.encoded-key: Credentials built from JSON String, encoded on
base64,
Google Cloud Client Libraries default credentials provider.
|
Modifier and Type | Method and Description |
---|---|
com.google.auth.Credentials |
getCredentials() |
public DefaultCredentialsProvider(CredentialsSupplier credentialsSupplier) throws IOException
If credentials are provided by one source, the next sources are discarded.
credentialsSupplier
- provides properties that can override OAuth2
scopes list used by the credentials, and the location of the OAuth2 credentials private
key.IOException
- if an issue occurs creating the DefaultCredentialsProviderpublic com.google.auth.Credentials getCredentials() throws IOException
getCredentials
in interface com.google.api.gax.core.CredentialsProvider
IOException
Copyright © 2021. All rights reserved.