Package com.google.auth.oauth2
Class ExternalAccountAuthorizedUserCredentials.Builder
java.lang.Object
com.google.auth.oauth2.OAuth2Credentials.Builder
com.google.auth.oauth2.GoogleCredentials.Builder
com.google.auth.oauth2.ExternalAccountAuthorizedUserCredentials.Builder
- Enclosing class:
ExternalAccountAuthorizedUserCredentials
public static class ExternalAccountAuthorizedUserCredentials.Builder
extends GoogleCredentials.Builder
Builder for
ExternalAccountAuthorizedUserCredentials
.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private String
private String
private String
private String
private String
private String
private HttpTransportFactory
Fields inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
quotaProjectId, universeDomain
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Builder()
protected
Builder
(ExternalAccountAuthorizedUserCredentials credentials) -
Method Summary
Modifier and TypeMethodDescriptionbuild()
setAccessToken
(AccessToken accessToken) Sets the optional access token.setAudience
(String audience) Sets the optional audience, which is usually the fully specified resource name of the workforce pool provider.setClientId
(String clientId) Sets the OAuth 2.0 client ID.setClientSecret
(String clientSecret) Sets the OAuth 2.0 client secret.setHttpTransportFactory
(HttpTransportFactory transportFactory) Sets the HTTP transport factory.setQuotaProjectId
(String quotaProjectId) Sets the optional project used for quota and billing purposes.setRefreshToken
(String refreshToken) Sets the OAuth 2.0 refresh token.setRevokeUrl
(String revokeUrl) Sets the token revocation endpoint.setTokenInfoUrl
(String tokenInfoUrl) Sets the token introspection endpoint used to retrieve account related information.setTokenUrl
(String tokenUrl) Sets the token exchange endpoint.setUniverseDomain
(String universeDomain) Sets the optional universe domain.Methods inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
getQuotaProjectId, getUniverseDomain
Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin
-
Field Details
-
transportFactory
-
audience
-
refreshToken
-
tokenUrl
-
tokenInfoUrl
-
revokeUrl
-
clientId
-
clientSecret
-
-
Constructor Details
-
Builder
protected Builder() -
Builder
-
-
Method Details
-
setHttpTransportFactory
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory) Sets the HTTP transport factory.- Parameters:
transportFactory
- theHttpTransportFactory
to set- Returns:
- this
Builder
object
-
setAudience
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setAudience(String audience) Sets the optional audience, which is usually the fully specified resource name of the workforce pool provider.- Parameters:
audience
- the audience to set- Returns:
- this
Builder
object
-
setTokenUrl
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setTokenUrl(String tokenUrl) Sets the token exchange endpoint.- Parameters:
tokenUrl
- the token exchange url to set- Returns:
- this
Builder
object
-
setTokenInfoUrl
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setTokenInfoUrl(String tokenInfoUrl) Sets the token introspection endpoint used to retrieve account related information.- Parameters:
tokenInfoUrl
- the token info url to set- Returns:
- this
Builder
object
-
setRevokeUrl
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setRevokeUrl(String revokeUrl) Sets the token revocation endpoint.- Parameters:
revokeUrl
- the revoke url to set- Returns:
- this
Builder
object
-
setRefreshToken
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setRefreshToken(String refreshToken) Sets the OAuth 2.0 refresh token.- Parameters:
refreshToken
- the refresh token- Returns:
- this
Builder
object
-
setClientId
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setClientId(String clientId) Sets the OAuth 2.0 client ID.- Parameters:
clientId
- the client ID- Returns:
- this
Builder
object
-
setClientSecret
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setClientSecret(String clientSecret) Sets the OAuth 2.0 client secret.- Parameters:
clientSecret
- the client secret- Returns:
- this
Builder
object
-
setQuotaProjectId
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setQuotaProjectId(String quotaProjectId) Sets the optional project used for quota and billing purposes.- Overrides:
setQuotaProjectId
in classGoogleCredentials.Builder
- Parameters:
quotaProjectId
- the quota and billing project id to set- Returns:
- this
Builder
object
-
setAccessToken
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setAccessToken(AccessToken accessToken) Sets the optional access token.- Overrides:
setAccessToken
in classGoogleCredentials.Builder
- Parameters:
accessToken
- the access token- Returns:
- this
Builder
object
-
setUniverseDomain
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setUniverseDomain(String universeDomain) Sets the optional universe domain. The Google Default Universe is used when not provided.- Overrides:
setUniverseDomain
in classGoogleCredentials.Builder
- Parameters:
universeDomain
- the universe domain to set- Returns:
- this
Builder
object
-
build
- Overrides:
build
in classGoogleCredentials.Builder
-