Class ExternalAccountAuthorizedUserCredentials.Builder (1.31.0)

publicstaticclass ExternalAccountAuthorizedUserCredentials.BuilderextendsGoogleCredentials.Builder

Inheritance

java.lang.Object > OAuth2Credentials.Builder > GoogleCredentials.Builder > ExternalAccountAuthorizedUserCredentials.Builder

Constructors

Builder()

protectedBuilder()

Builder(ExternalAccountAuthorizedUserCredentials credentials)

protectedBuilder(ExternalAccountAuthorizedUserCredentialscredentials)
Parameter
Name Description
credentials ExternalAccountAuthorizedUserCredentials

Methods

build()

publicExternalAccountAuthorizedUserCredentialsbuild()
Returns
Type Description
ExternalAccountAuthorizedUserCredentials
Overrides

setAccessToken(AccessToken accessToken)

publicExternalAccountAuthorizedUserCredentials.BuildersetAccessToken(AccessTokenaccessToken)

Sets the optional access token.

Parameter
Name Description
accessToken AccessToken

the access token

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

Overrides

setAudience(String audience)

publicExternalAccountAuthorizedUserCredentials.BuildersetAudience(Stringaudience)

Sets the optional audience, which is usually the fully specified resource name of the workforce pool provider.

Parameter
Name Description
audience String

the audience to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setClientId(String clientId)

publicExternalAccountAuthorizedUserCredentials.BuildersetClientId(StringclientId)

Sets the OAuth 2.0 client ID.

Parameter
Name Description
clientId String

the client ID

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setClientSecret(String clientSecret)

publicExternalAccountAuthorizedUserCredentials.BuildersetClientSecret(StringclientSecret)

Sets the OAuth 2.0 client secret.

Parameter
Name Description
clientSecret String

the client secret

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setHttpTransportFactory(HttpTransportFactory transportFactory)

publicExternalAccountAuthorizedUserCredentials.BuildersetHttpTransportFactory(HttpTransportFactorytransportFactory)

Sets the HTTP transport factory.

Parameter
Name Description
transportFactory HttpTransportFactory

the HttpTransportFactory to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setQuotaProjectId(String quotaProjectId)

publicExternalAccountAuthorizedUserCredentials.BuildersetQuotaProjectId(StringquotaProjectId)

Sets the optional project used for quota and billing purposes.

Parameter
Name Description
quotaProjectId String

the quota and billing project id to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

Overrides

setRefreshToken(String refreshToken)

publicExternalAccountAuthorizedUserCredentials.BuildersetRefreshToken(StringrefreshToken)

Sets the OAuth 2.0 refresh token.

Parameter
Name Description
refreshToken String

the refresh token

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setRevokeUrl(String revokeUrl)

publicExternalAccountAuthorizedUserCredentials.BuildersetRevokeUrl(StringrevokeUrl)

Sets the token revocation endpoint.

Parameter
Name Description
revokeUrl String

the revoke url to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setTokenInfoUrl(String tokenInfoUrl)

publicExternalAccountAuthorizedUserCredentials.BuildersetTokenInfoUrl(StringtokenInfoUrl)

Sets the token introspection endpoint used to retrieve account related information.

Parameter
Name Description
tokenInfoUrl String

the token info url to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setTokenUrl(String tokenUrl)

publicExternalAccountAuthorizedUserCredentials.BuildersetTokenUrl(StringtokenUrl)

Sets the token exchange endpoint.

Parameter
Name Description
tokenUrl String

the token exchange url to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setUniverseDomain(String universeDomain)

publicExternalAccountAuthorizedUserCredentials.BuildersetUniverseDomain(StringuniverseDomain)

Sets the optional universe domain. The Google Default Universe is used when not provided.

Parameter
Name Description
universeDomain String

the universe domain to set

Returns
Type Description
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

Overrides

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 2025年10月30日 UTC.