Class IdTokenCredentials.Builder (1.54.0)
Stay organized with collections
Save and categorize content based on your preferences.
public static class IdTokenCredentials.Builder extends OAuth2Credentials.Builder
Constructors
Builder()
Methods
build()
public IdTokenCredentials build()
Overrides
getIdTokenProvider()
public @Nullable IdTokenProvider getIdTokenProvider()
| Returns |
| Type |
Description |
@org.jspecify.annotations.Nullable com.google.auth.oauth2.IdTokenProvider |
|
getOptions()
public @Nullable List<IdTokenProvider.Option> getOptions()
| Returns |
| Type |
Description |
@org.jspecify.annotations.Nullable java.util.List<Option> |
|
getTargetAudience()
public @Nullable String getTargetAudience()
| Returns |
| Type |
Description |
@org.jspecify.annotations.Nullable java.lang.String |
|
setIdTokenProvider(IdTokenProvider idTokenProvider)
public IdTokenCredentials.Builder setIdTokenProvider(IdTokenProvider idTokenProvider)
Sets the provider for the ID token.
| Parameter |
| Name |
Description |
idTokenProvider |
IdTokenProvider
the provider for the ID token, cannot be null
|
setOptions(@Nullable List<IdTokenProvider.Option> options)
public IdTokenCredentials.Builder setOptions(@Nullable List<IdTokenProvider.Option> options)
Sets the options for the ID token.
| Parameter |
| Name |
Description |
options |
@org.jspecify.annotations.Nullable java.util.List<Option>
list of options, can be null or empty if no options are needed.
|
setTargetAudience(@Nullable String targetAudience)
public IdTokenCredentials.Builder setTargetAudience(@Nullable String targetAudience)
Sets the target audience for the ID token.
| Parameter |
| Name |
Description |
targetAudience |
@org.jspecify.annotations.Nullable java.lang.String
the target audience, cannot be null for non-UserCredentials. If set for
UserCredentials, the value will be ignored.
|
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 2026-10-05 UTC.
[null,null,["Last updated 2026-10-05 UTC."],[],[]]