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 CredentialAccessBoundary
credentialAccessBoundary
private GoogleCredentials
sourceCredential
private HttpTransportFactory
transportFactory
private java.lang.String
universeDomain
-
Constructor Summary
Constructors Modifier Constructor Description private
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DownscopedCredentials
build()
DownscopedCredentials.Builder
setCredentialAccessBoundary(CredentialAccessBoundary credentialAccessBoundary)
Sets the required credential access boundary which specifies the upper bound of permissions that the credential can access.DownscopedCredentials.Builder
setHttpTransportFactory(HttpTransportFactory transportFactory)
Sets the HTTP transport factory.DownscopedCredentials.Builder
setSourceCredential(GoogleCredentials sourceCredential)
Sets the required source credential used to acquire the downscoped credential.DownscopedCredentials.Builder
setUniverseDomain(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
- 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
@CanIgnoreReturnValue public DownscopedCredentials.Builder setUniverseDomain(java.lang.String universeDomain)
Sets the optional universe domain.- Parameters:
universeDomain
- the universe domain to set- Returns:
- this
Builder
object
-
build
public DownscopedCredentials build()
- Overrides:
build
in classOAuth2Credentials.Builder
-
-