Class SsoCredentialsProvider
- java.lang.Object
-
- software.amazon.awssdk.services.sso.auth.SsoCredentialsProvider
-
- All Implemented Interfaces:
AutoCloseable,AwsCredentialsProvider,IdentityProvider<AwsCredentialsIdentity>,ToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>,SdkAutoCloseable
public final class SsoCredentialsProvider extends Object implements AwsCredentialsProvider, SdkAutoCloseable, ToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
An implementation ofAwsCredentialsProviderthat periodically sends aGetRoleCredentialsRequestto 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 (ifSsoCredentialsProvider.Builder.asyncCredentialUpdateEnabled(Boolean)is set). If the credentials are not successfully updated before expiration, calls toresolveCredentials()will block until they are updated successfully. Users of this provider mustclose()it when they are finished using it. This is created usingbuilder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSsoCredentialsProvider.BuilderA builder for creating a customSsoCredentialsProvider.protected static classSsoCredentialsProvider.BuilderImpl
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SsoCredentialsProvider.BuilderImplbuilder()Get a builder for creating a customSsoCredentialsProvider.voidclose()DurationprefetchTime()The amount of time, relative to session token expiration, that the cached credentials are considered close to stale and should be updated.AwsCredentialsresolveCredentials()DurationstaleTime()The amount of time, relative to session token expiration, that the cached credentials are considered stale and should no longer be used.SsoCredentialsProvider.BuildertoBuilder()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.auth.credentials.AwsCredentialsProvider
identityType, resolveIdentity
-
Methods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentity
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
staleTime
public Duration 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
public Duration prefetchTime()
The amount of time, relative to session token expiration, that the cached credentials are considered close to stale and should be updated.
-
builder
public static SsoCredentialsProvider.BuilderImpl builder()
Get a builder for creating a customSsoCredentialsProvider.
-
resolveCredentials
public AwsCredentials resolveCredentials()
- Specified by:
resolveCredentialsin interfaceAwsCredentialsProvider
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSdkAutoCloseable
-
toBuilder
public SsoCredentialsProvider.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<SsoCredentialsProvider.Builder,SsoCredentialsProvider>
-
-