public final class SsoCredentialsProvider extends Object implements AwsCredentialsProvider, SdkAutoCloseable, ToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
AwsCredentialsProvider that periodically sends a GetRoleCredentialsRequest to the AWS
Single Sign-On Service to maintain short-lived sessions to use for authentication. These sessions are updated using a single
calling thread (by default) or asynchronously (if SsoCredentialsProvider.Builder.asyncCredentialUpdateEnabled(Boolean) is set).
If the credentials are not successfully updated before expiration, calls to resolveCredentials() will block until
they are updated successfully.
Users of this provider must close() it when they are finished using it.
This is created using builder().| Modifier and Type | Class and Description |
|---|---|
static interface |
SsoCredentialsProvider.Builder
A builder for creating a custom
SsoCredentialsProvider. |
protected static class |
SsoCredentialsProvider.BuilderImpl |
| Modifier and Type | Method and Description |
|---|---|
static SsoCredentialsProvider.BuilderImpl |
builder()
Get a builder for creating a custom
SsoCredentialsProvider. |
void |
close() |
Duration |
prefetchTime()
The amount of time, relative to session token expiration, that the cached credentials are considered close to stale
and should be updated.
|
AwsCredentials |
resolveCredentials() |
Duration |
staleTime()
The amount of time, relative to session token expiration, that the cached credentials are considered stale and
should no longer be used.
|
SsoCredentialsProvider.Builder |
toBuilder() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcopypublic Duration staleTime()
public Duration prefetchTime()
public static SsoCredentialsProvider.BuilderImpl builder()
SsoCredentialsProvider.public AwsCredentials resolveCredentials()
resolveCredentials in interface AwsCredentialsProviderpublic void close()
close in interface AutoCloseableclose in interface SdkAutoCloseablepublic SsoCredentialsProvider.Builder toBuilder()
toBuilder in interface ToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>Copyright © 2023. All rights reserved.