Class DefaultAwsTokenProvider
java.lang.Object
software.amazon.awssdk.auth.token.credentials.aws.DefaultAwsTokenProvider
- All Implemented Interfaces:
AutoCloseable,SdkTokenProvider,IdentityProvider<TokenIdentity>,SdkAutoCloseable
public final class DefaultAwsTokenProvider
extends Object
implements SdkTokenProvider, SdkAutoCloseable
A token provider chain that looks for providers in this order:
- A profile based provider that can initialize token providers based on profile configurations
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration that defines theDefaultAwsTokenProvider's behavior. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Get a builder for defining aDefaultAwsTokenProviderwith custom configuration.voidclose()static DefaultAwsTokenProvidercreate()Returns anSdkTokenthat can be used to authorize a request.toString()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentityMethods inherited from interface software.amazon.awssdk.auth.token.credentials.SdkTokenProvider
identityType, resolveIdentity
-
Method Details
-
create
-
builder
Get a builder for defining aDefaultAwsTokenProviderwith custom configuration. -
resolveToken
Description copied from interface:SdkTokenProviderReturns anSdkTokenthat can be used to authorize a request. Each implementation of SdkTokenProvider can choose its own strategy for loading token. For example, an implementation might load token from an existing key management system, or load new token when token is refreshed.- Specified by:
resolveTokenin interfaceSdkTokenProvider- Returns:
- AwsToken which the caller can use to authorize an AWS request using token authorization for a request.
-
close
public void close()Description copied from interface:SdkAutoCloseable- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSdkAutoCloseable
-
toString
-