Class ClientSideCredentialAccessBoundaryFactory.Builder (1.36.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticclass ClientSideCredentialAccessBoundaryFactory.BuilderBuilder for ClientSideCredentialAccessBoundaryFactory.
Use this builder to create instances of ClientSideCredentialAccessBoundaryFactory
with the desired configuration options.
Inherited Members
Methods
build()
publicClientSideCredentialAccessBoundaryFactorybuild()Creates a new ClientSideCredentialAccessBoundaryFactory instance based on the current
builder configuration.
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory |
A new |
setClock(Clock clock)
publicClientSideCredentialAccessBoundaryFactory.BuildersetClock(Clockclock)Set the clock for checking token expiry. Used for testing.
| Parameter | |
|---|---|
| Name | Description |
clock |
com.google.api.client.util.Clockthe clock to use. Defaults to the system clock |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
the builder |
setHttpTransportFactory(HttpTransportFactory transportFactory)
publicClientSideCredentialAccessBoundaryFactory.BuildersetHttpTransportFactory(HttpTransportFactorytransportFactory)Sets the HTTP transport factory.
| Parameter | |
|---|---|
| Name | Description |
transportFactory |
HttpTransportFactory the |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
this |
setMinimumTokenLifetime(Duration minimumTokenLifetime)
publicClientSideCredentialAccessBoundaryFactory.BuildersetMinimumTokenLifetime(DurationminimumTokenLifetime)Sets the minimum acceptable lifetime for a generated downscoped access token.
This parameter ensures that any generated downscoped access token has a minimum validity
period. If the time remaining before the underlying credentials expire is less than this
value, the factory will perform a blocking refresh, meaning that it will wait until the
credentials are refreshed before generating a new downscoped token. This guarantees that the
generated token will be valid for at least minimumTokenLifetime. A reasonable value
should be chosen based on the expected duration of operations using the downscoped token. If
not set, the default value is defined by #DEFAULT_MINIMUM_TOKEN_LIFETIME.
| Parameter | |
|---|---|
| Name | Description |
minimumTokenLifetime |
Duration The minimum acceptable lifetime for a generated downscoped access token. Must be greater than zero. |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
This |
setRefreshMargin(Duration refreshMargin)
publicClientSideCredentialAccessBoundaryFactory.BuildersetRefreshMargin(DurationrefreshMargin)Sets the refresh margin for the underlying credentials.
This duration specifies how far in advance of the credentials' expiration time an asynchronous refresh should be initiated. This refresh happens in the background, without blocking the main thread. If not provided, it will default to the value defined by #DEFAULT_REFRESH_MARGIN.
Note: The refreshMargin must be at least one minute longer than the
minimumTokenLifetime.
| Parameter | |
|---|---|
| Name | Description |
refreshMargin |
Duration The refresh margin. Must be greater than zero. |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
This |
setSourceCredential(GoogleCredentials sourceCredential)
publicClientSideCredentialAccessBoundaryFactory.BuildersetSourceCredential(GoogleCredentialssourceCredential)Sets the required source credential.
| Parameter | |
|---|---|
| Name | Description |
sourceCredential |
GoogleCredentials the |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
this |
setUniverseDomain(String universeDomain)
publicClientSideCredentialAccessBoundaryFactory.BuildersetUniverseDomain(StringuniverseDomain)Sets the optional universe domain.
| Parameter | |
|---|---|
| Name | Description |
universeDomain |
String the universe domain to set |
| Returns | |
|---|---|
| Type | Description |
ClientSideCredentialAccessBoundaryFactory.Builder |
this |