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
public static class DownscopedCredentials.Builder extends OAuth2Credentials.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private CredentialAccessBoundarycredentialAccessBoundaryprivate GoogleCredentialssourceCredentialprivate HttpTransportFactorytransportFactoryprivate java.lang.StringuniverseDomain
-
Constructor Summary
Constructors Modifier Constructor Description privateBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DownscopedCredentialsbuild()DownscopedCredentials.BuildersetCredentialAccessBoundary(CredentialAccessBoundary credentialAccessBoundary)Sets the required credential access boundary which specifies the upper bound of permissions that the credential can access.DownscopedCredentials.BuildersetHttpTransportFactory(HttpTransportFactory transportFactory)Sets the HTTP transport factory.DownscopedCredentials.BuildersetSourceCredential(GoogleCredentials sourceCredential)Sets the required source credential used to acquire the downscoped credential.DownscopedCredentials.BuildersetUniverseDomain(java.lang.String universeDomain)Sets the optional universe domain.-
Methods inherited from class com.google.auth.oauth2.OAuth2Credentials.Builder
getAccessToken, getExpirationMargin, getRefreshMargin, setAccessToken, setExpirationMargin, setRefreshMargin
-
-
-
-
Field Detail
-
sourceCredential
private GoogleCredentials sourceCredential
-
credentialAccessBoundary
private CredentialAccessBoundary credentialAccessBoundary
-
transportFactory
private HttpTransportFactory transportFactory
-
universeDomain
private java.lang.String universeDomain
-
-
Method Detail
-
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
@CanIgnoreReturnValue public DownscopedCredentials.Builder setUniverseDomain(java.lang.String universeDomain)
Sets the optional universe domain.- Parameters:
universeDomain- the universe domain to set- Returns:
- this
Builderobject
-
build
public DownscopedCredentials build()
- Overrides:
buildin classOAuth2Credentials.Builder
-
-