Class GoogleCredentialsProvider (2.23.1)

public abstract class GoogleCredentialsProvider implements CredentialsProvider

GoogleCredentialsProvider acquires credentials using Application Default Credentials.

For more information on Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Inheritance

java.lang.Object > GoogleCredentialsProvider

Implements

CredentialsProvider

Static Methods

newBuilder()

public static GoogleCredentialsProvider.Builder newBuilder()
Returns
TypeDescription
GoogleCredentialsProvider.Builder

Constructors

GoogleCredentialsProvider()

public GoogleCredentialsProvider()

Methods

getCredentials()

public Credentials getCredentials()

Gets the credentials which will be used to call the service. If the credentials have not been acquired yet, then they will be acquired when this function is called.

Returns
TypeDescription
com.google.auth.Credentials
Exceptions
TypeDescription
IOException

getJwtEnabledScopes()

public abstract List<String> getJwtEnabledScopes()
Returns
TypeDescription
List<String>

getScopesToApply()

public abstract List<String> getScopesToApply()
Returns
TypeDescription
List<String>

getUseJwtAccessWithScope()

public abstract boolean getUseJwtAccessWithScope()
Returns
TypeDescription
boolean

toBuilder()

public abstract GoogleCredentialsProvider.Builder toBuilder()
Returns
TypeDescription
GoogleCredentialsProvider.Builder