Package com.google.auth.oauth2
Class DownscopedCredentials.Builder
java.lang.Object
com.google.auth.oauth2.OAuth2Credentials.Builder
com.google.auth.oauth2.DownscopedCredentials.Builder
- Enclosing class:
DownscopedCredentials
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CredentialAccessBoundary
private GoogleCredentials
private HttpTransportFactory
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
setCredentialAccessBoundary
(CredentialAccessBoundary credentialAccessBoundary) Sets the required credential access boundary which specifies the upper bound of permissions that the credential can access.setHttpTransportFactory
(HttpTransportFactory transportFactory) Sets the HTTP transport factory.setSourceCredential
(GoogleCredentials sourceCredential) Sets the required source credential used to acquire the downscoped credential.setUniverseDomain
(String universeDomain) Sets the optional universe domain.Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setAccessToken, setExpirationMargin, setRefreshMargin
-
Field Details
-
sourceCredential
-
credentialAccessBoundary
-
transportFactory
-
universeDomain
-
-
Constructor Details
-
Builder
private Builder()
-
-
Method Details
-
setSourceCredential
@CanIgnoreReturnValue public DownscopedCredentials.Builder setSourceCredential(GoogleCredentials sourceCredential) Sets the required source credential used to acquire the downscoped credential.- Parameters:
sourceCredential
- theGoogleCredentials
to set- Returns:
- this
Builder
object
-
setCredentialAccessBoundary
@CanIgnoreReturnValue public DownscopedCredentials.Builder setCredentialAccessBoundary(CredentialAccessBoundary credentialAccessBoundary) Sets the required credential access boundary which specifies the upper bound of permissions that the credential can access. SeeCredentialAccessBoundary
for more information.- Parameters:
credentialAccessBoundary
- theCredentialAccessBoundary
to set- Returns:
- this
Builder
object
-
setHttpTransportFactory
@CanIgnoreReturnValue public DownscopedCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory) Sets the HTTP transport factory.- Parameters:
transportFactory
- theHttpTransportFactory
to set- Returns:
- this
Builder
object
-
setUniverseDomain
Sets the optional universe domain.- Parameters:
universeDomain
- the universe domain to set- Returns:
- this
Builder
object
-
build
- Overrides:
build
in classOAuth2Credentials.Builder
-