Send feedback
Class GoogleCredentialsProvider.Builder (2.24.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version latest keyboard_arrow_down
public abstract static class GoogleCredentialsProvider.Builder
Constructors
Builder()
Methods
build()
public GoogleCredentialsProvider build()
Returns
getJwtEnabledScopes()
public abstract List<String> getJwtEnabledScopes()
The JWT enable scopes previously provided.
Returns
getScopesToApply()
public abstract List<String> getScopesToApply()
The scopes previously provided.
Returns
getUseJwtAccessWithScope()
public abstract boolean getUseJwtAccessWithScope()
The UseJwtAccessWithScope value previously provided.
Returns
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
Returns
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
Returns
setUseJwtAccessWithScope(boolean val)
public abstract GoogleCredentialsProvider.Builder setUseJwtAccessWithScope(boolean val)
Whether self signed JWT with scopes should be used for service account credentials.
Parameter
Returns
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-03-25 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?