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 forExternalAccountAuthorizedUserCredentials
.
-
-
Field Summary
-
Fields inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
quotaProjectId
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
protected
Builder(ExternalAccountAuthorizedUserCredentials credentials)
-
Method Summary
-
Methods inherited from class com.google.auth.oauth2.GoogleCredentials.Builder
getQuotaProjectId
-
Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin
-
-
-
-
Constructor Detail
-
Builder
protected Builder()
-
Builder
protected Builder(ExternalAccountAuthorizedUserCredentials credentials)
-
-
Method Detail
-
setHttpTransportFactory
public ExternalAccountAuthorizedUserCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
Sets the HTTP transport factory.- Parameters:
transportFactory
- theHttpTransportFactory
to set- Returns:
- this
Builder
object
-
setAudience
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
public ExternalAccountAuthorizedUserCredentials.Builder setTokenUrl(String tokenUrl)
Sets the token exchange endpoint.- Parameters:
tokenUrl
- the token exchange url to set- Returns:
- this
Builder
object
-
setTokenInfoUrl
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
public ExternalAccountAuthorizedUserCredentials.Builder setRevokeUrl(String revokeUrl)
Sets the token revocation endpoint.- Parameters:
revokeUrl
- the revoke url to set- Returns:
- this
Builder
object
-
setRefreshToken
public ExternalAccountAuthorizedUserCredentials.Builder setRefreshToken(String refreshToken)
Sets the OAuth 2.0 refresh token.- Parameters:
refreshToken
- the refresh token- Returns:
- this
Builder
object
-
setClientId
public ExternalAccountAuthorizedUserCredentials.Builder setClientId(String clientId)
Sets the OAuth 2.0 client ID.- Parameters:
clientId
- the client ID- Returns:
- this
Builder
object
-
setClientSecret
public ExternalAccountAuthorizedUserCredentials.Builder setClientSecret(String clientSecret)
Sets the OAuth 2.0 client secret.- Parameters:
clientSecret
- the client secret- Returns:
- this
Builder
object
-
setQuotaProjectId
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
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
-
build
public ExternalAccountAuthorizedUserCredentials build()
- Overrides:
build
in classGoogleCredentials.Builder
-
-