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 Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate Stringprivate HttpTransportFactoryFields inherited from class GoogleCredentials.Builder
quotaProjectId, universeDomain -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBuilder()protectedBuilder(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 GoogleCredentials.Builder
getQuotaProjectId, getUniverseDomainMethods inherited from class 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- theHttpTransportFactoryto set- Returns:
- this
Builderobject
-
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
Builderobject
-
setTokenUrl
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setTokenUrl(String tokenUrl) Sets the token exchange endpoint.- Parameters:
tokenUrl- the token exchange url to set- Returns:
- this
Builderobject
-
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
Builderobject
-
setRevokeUrl
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setRevokeUrl(String revokeUrl) Sets the token revocation endpoint.- Parameters:
revokeUrl- the revoke url to set- Returns:
- this
Builderobject
-
setRefreshToken
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setRefreshToken(String refreshToken) Sets the OAuth 2.0 refresh token.- Parameters:
refreshToken- the refresh token- Returns:
- this
Builderobject
-
setClientId
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setClientId(String clientId) Sets the OAuth 2.0 client ID.- Parameters:
clientId- the client ID- Returns:
- this
Builderobject
-
setClientSecret
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setClientSecret(String clientSecret) Sets the OAuth 2.0 client secret.- Parameters:
clientSecret- the client secret- Returns:
- this
Builderobject
-
setQuotaProjectId
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setQuotaProjectId(String quotaProjectId) Sets the optional project used for quota and billing purposes.- Overrides:
setQuotaProjectIdin classGoogleCredentials.Builder- Parameters:
quotaProjectId- the quota and billing project id to set- Returns:
- this
Builderobject
-
setAccessToken
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setAccessToken(AccessToken accessToken) Sets the optional access token.- Overrides:
setAccessTokenin classGoogleCredentials.Builder- Parameters:
accessToken- the access token- Returns:
- this
Builderobject
-
setUniverseDomain
@CanIgnoreReturnValue public ExternalAccountAuthorizedUserCredentials.Builder setUniverseDomain(String universeDomain) Sets the optional universe domain. The Google Default Universe is used when not provided.- Overrides:
setUniverseDomainin classGoogleCredentials.Builder- Parameters:
universeDomain- the universe domain to set- Returns:
- this
Builderobject
-
build
- Overrides:
buildin classGoogleCredentials.Builder
-