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
-
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(@Nullable HttpTransportFactory transportFactory) Sets the HTTP transport factory.setSourceCredential(GoogleCredentials sourceCredential) Sets the required source credential used to acquire the downscoped credential.setUniverseDomain(@Nullable String universeDomain) Sets the optional universe domain.Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setAccessToken, setExpirationMargin, setRefreshMargin
-
Method Details
-
setSourceCredential
@CanIgnoreReturnValue public DownscopedCredentials.Builder setSourceCredential(GoogleCredentials sourceCredential) Sets the required source credential used to acquire the downscoped credential.- Parameters:
sourceCredential- theGoogleCredentialsto set- Returns:
- this
Builderobject
-
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. SeeCredentialAccessBoundaryfor more information.- Parameters:
credentialAccessBoundary- theCredentialAccessBoundaryto set- Returns:
- this
Builderobject
-
setHttpTransportFactory
@CanIgnoreReturnValue public DownscopedCredentials.Builder setHttpTransportFactory(@Nullable HttpTransportFactory transportFactory) Sets the HTTP transport factory.- Parameters:
transportFactory- theHttpTransportFactoryto set- Returns:
- this
Builderobject
-
setUniverseDomain
@CanIgnoreReturnValue public DownscopedCredentials.Builder setUniverseDomain(@Nullable String universeDomain) Sets the optional universe domain.- Parameters:
universeDomain- the universe domain to set- Returns:
- this
Builderobject
-
build
- Overrides:
buildin classOAuth2Credentials.Builder
-