Class GoogleCredentialsProvider.Builder (2.37.0)

public abstract static class GoogleCredentialsProvider.Builder

Inheritance

java.lang.Object > GoogleCredentialsProvider.Builder

Constructors

Builder()

public Builder()

Methods

build()

public GoogleCredentialsProvider build()
Returns
TypeDescription
GoogleCredentialsProvider

getJwtEnabledScopes()

public abstract List<String> getJwtEnabledScopes()

The JWT enable scopes previously provided.

Returns
TypeDescription
List<String>

getScopesToApply()

public abstract List<String> getScopesToApply()

The scopes previously provided.

Returns
TypeDescription
List<String>

getUseJwtAccessWithScope()

public abstract boolean getUseJwtAccessWithScope()

The UseJwtAccessWithScope value previously provided.

Returns
TypeDescription
boolean

setJwtEnabledScopes(List<String> val)

public abstract GoogleCredentialsProvider.Builder setJwtEnabledScopes(List<String> val)

Sets the scopes that are compatible with JWT tokens.

JWT Tokens don't support scopes, they only support audiences. Audiences allow access to the entire service as opposed some subset (ie. access can't be restricted to use the scope https://www.googleapis.com/auth/bigtable.data.readonly). A service client can opt-in to using JWT tokens by specifying which scopes encompass the entire service. If any of those scopes are present when the client is using ServiceAccountCredentials, then JWT tokens will be used for authentication.

Parameter
NameDescription
valList<String>
Returns
TypeDescription
GoogleCredentialsProvider.Builder

setScopesToApply(List<String> val)

public abstract GoogleCredentialsProvider.Builder setScopesToApply(List<String> val)

Sets the scopes to apply to the credentials that are acquired from Application Default Credentials, before the credentials are sent to the service.

Parameter
NameDescription
valList<String>
Returns
TypeDescription
GoogleCredentialsProvider.Builder

setUseJwtAccessWithScope(boolean val)

public abstract GoogleCredentialsProvider.Builder setUseJwtAccessWithScope(boolean val)

Whether self signed JWT with scopes should be used for service account credentials.

Parameter
NameDescription
valboolean
Returns
TypeDescription
GoogleCredentialsProvider.Builder