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 SummaryNested ClassesModifier and TypeClassDescriptionstatic interfaceA builder for creating a customSsoCredentialsProvider.
- 
Method SummaryModifier and TypeMethodDescriptionstatic software.amazon.awssdk.services.sso.auth.SsoCredentialsProvider.BuilderImplbuilder()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.ReturnsAwsCredentialsthat can be used to authorize an AWS request.The amount of time, relative to session token expiration, that the cached credentials are considered stale and should no longer be used.Take this object and create a builder that contains all of the current property values of this object.Methods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvideridentityType, resolveIdentityMethods inherited from interface software.amazon.awssdk.identity.spi.IdentityProviderresolveIdentity, resolveIdentityMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuildercopy
- 
Method Details- 
staleTimeThe 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.
- 
prefetchTimeThe amount of time, relative to session token expiration, that the cached credentials are considered close to stale and should be updated.
- 
builderpublic static software.amazon.awssdk.services.sso.auth.SsoCredentialsProvider.BuilderImpl builder()Get a builder for creating a customSsoCredentialsProvider.
- 
resolveCredentialsDescription copied from interface:AwsCredentialsProviderReturnsAwsCredentialsthat can be used to authorize an AWS request. Each implementation of AWSCredentialsProvider can choose its own strategy for loading credentials. For example, an implementation might load credentials from an existing key management system, or load new credentials when credentials are rotated.If an error occurs during the loading of credentials or credentials could not be found, a runtime exception will be raised. - Specified by:
- resolveCredentialsin interface- AwsCredentialsProvider
- Returns:
- AwsCredentials which the caller can use to authorize an AWS request.
 
- 
closepublic void close()Description copied from interface:SdkAutoCloseable- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- SdkAutoCloseable
 
- 
toBuilderDescription copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
- toBuilderin interface- ToCopyableBuilder<SsoCredentialsProvider.Builder,- SsoCredentialsProvider> 
- Returns:
- a builder for type T
 
 
-