Class SsoCredentialsProvider
java.lang.Object
software.amazon.awssdk.services.sso.auth.SsoCredentialsProvider
- All Implemented Interfaces:
AutoCloseable,AwsCredentialsProvider,IdentityProvider<AwsCredentialsIdentity>,ToCopyableBuilder<SsoCredentialsProvider.Builder,,SsoCredentialsProvider> SdkAutoCloseable
@SdkPublicApi
public final class SsoCredentialsProvider
extends Object
implements AwsCredentialsProvider, SdkAutoCloseable, ToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
An implementation of
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().-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA builder for creating a customSsoCredentialsProvider.protected static final class -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Get a builder for creating a customSsoCredentialsProvider.voidclose()The amount of time, relative to session token expiration, that the cached credentials are considered close to stale and should be updated.The amount of time, relative to session token expiration, that the cached credentials are considered stale and should no longer be used.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
identityType, resolveIdentityMethods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentityMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
staleTime
The amount of time, relative to session token expiration, that the cached credentials are considered stale and should no longer be used. All threads will block until the value is updated. -
prefetchTime
The amount of time, relative to session token expiration, that the cached credentials are considered close to stale and should be updated. -
builder
Get a builder for creating a customSsoCredentialsProvider. -
resolveCredentials
- Specified by:
resolveCredentialsin interfaceAwsCredentialsProvider
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSdkAutoCloseable
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
-