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 CredentialAccessBoundaryprivate GoogleCredentialsprivate HttpTransportFactoryprivate 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 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- 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(HttpTransportFactory transportFactory) Sets the HTTP transport factory.- Parameters:
transportFactory- theHttpTransportFactoryto set- Returns:
- this
Builderobject
-
setUniverseDomain
Sets the optional universe domain.- Parameters:
universeDomain- the universe domain to set- Returns:
- this
Builderobject
-
build
- Overrides:
buildin classOAuth2Credentials.Builder
-