Send feedback
Class GoogleCredentialsProvider.Builder (2.42.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.42.0 keyboard_arrow_down
Beta
This library is covered by the Pre-GA Offerings Terms
of the Terms of Service. Pre-GA libraries might have limited support,
and changes to pre-GA libraries might not be compatible with other pre-GA versions.
For more information, see the
launch stage descriptions .
public abstract static class GoogleCredentialsProvider . Builder
Constructors
Builder()
Methods
build()
public GoogleCredentialsProvider build ()
getJwtEnabledScopes()
public abstract List<String> getJwtEnabledScopes ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
The JWT enable scopes previously provided.
getScopesToApply()
public abstract List<String> getScopesToApply ()
The scopes previously provided.
getUseJwtAccessWithScope()
public abstract boolean getUseJwtAccessWithScope ()
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
The UseJwtAccessWithScope value previously provided.
setJwtEnabledScopes(List<String> val)
public abstract GoogleCredentialsProvider . Builder setJwtEnabledScopes ( List<String> val )
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
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.
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.
setUseJwtAccessWithScope(boolean val)
public abstract GoogleCredentialsProvider . Builder setUseJwtAccessWithScope ( boolean val )
Beta
This feature is covered by the Pre-GA Offerings Terms of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.
Whether self signed JWT with scopes should be used for service account credentials.
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 2024-12-19 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-19 UTC."],[],[]]