Class ExternalAccountAuthorizedUserCredentials.Builder (1.19.0)

public static class ExternalAccountAuthorizedUserCredentials.Builder extends GoogleCredentials.Builder

Inheritance

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

Constructors

Builder()

protected Builder()

Builder(ExternalAccountAuthorizedUserCredentials credentials)

protected Builder(ExternalAccountAuthorizedUserCredentials credentials)
Parameter
NameDescription
credentialsExternalAccountAuthorizedUserCredentials

Methods

build()

public ExternalAccountAuthorizedUserCredentials build()
Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials
Overrides

setAccessToken(AccessToken accessToken)

public ExternalAccountAuthorizedUserCredentials.Builder setAccessToken(AccessToken accessToken)

Sets the optional access token.

Parameter
NameDescription
accessTokenAccessToken

the access token

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

Overrides

setAudience(String audience)

public ExternalAccountAuthorizedUserCredentials.Builder setAudience(String audience)

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

Parameter
NameDescription
audienceString

the audience to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setClientId(String clientId)

public ExternalAccountAuthorizedUserCredentials.Builder setClientId(String clientId)

Sets the OAuth 2.0 client ID.

Parameter
NameDescription
clientIdString

the client ID

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setClientSecret(String clientSecret)

public ExternalAccountAuthorizedUserCredentials.Builder setClientSecret(String clientSecret)

Sets the OAuth 2.0 client secret.

Parameter
NameDescription
clientSecretString

the client secret

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setHttpTransportFactory(HttpTransportFactory transportFactory)

public ExternalAccountAuthorizedUserCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)

Sets the HTTP transport factory.

Parameter
NameDescription
transportFactoryHttpTransportFactory

the HttpTransportFactory to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setQuotaProjectId(String quotaProjectId)

public ExternalAccountAuthorizedUserCredentials.Builder setQuotaProjectId(String quotaProjectId)

Sets the optional project used for quota and billing purposes.

Parameter
NameDescription
quotaProjectIdString

the quota and billing project id to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

Overrides

setRefreshToken(String refreshToken)

public ExternalAccountAuthorizedUserCredentials.Builder setRefreshToken(String refreshToken)

Sets the OAuth 2.0 refresh token.

Parameter
NameDescription
refreshTokenString

the refresh token

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setRevokeUrl(String revokeUrl)

public ExternalAccountAuthorizedUserCredentials.Builder setRevokeUrl(String revokeUrl)

Sets the token revocation endpoint.

Parameter
NameDescription
revokeUrlString

the revoke url to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setTokenInfoUrl(String tokenInfoUrl)

public ExternalAccountAuthorizedUserCredentials.Builder setTokenInfoUrl(String tokenInfoUrl)

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

Parameter
NameDescription
tokenInfoUrlString

the token info url to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object

setTokenUrl(String tokenUrl)

public ExternalAccountAuthorizedUserCredentials.Builder setTokenUrl(String tokenUrl)

Sets the token exchange endpoint.

Parameter
NameDescription
tokenUrlString

the token exchange url to set

Returns
TypeDescription
ExternalAccountAuthorizedUserCredentials.Builder

this Builder object