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:
ProfileTokenProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAwsTokenProvider.Builder
Configuration that defines theDefaultAwsTokenProvider
's behavior.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultAwsTokenProvider.Builder
builder()
Get a builder for defining aDefaultAwsTokenProvider
with custom configuration.void
close()
static DefaultAwsTokenProvider
create()
SdkToken
resolveToken()
Returns anSdkToken
that can be used to authorize a request.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.identity.spi.IdentityProvider
resolveIdentity, resolveIdentity
-
Methods inherited from interface software.amazon.awssdk.auth.token.credentials.SdkTokenProvider
identityType, resolveIdentity
-
-
-
-
Method Detail
-
create
public static DefaultAwsTokenProvider create()
-
builder
public static DefaultAwsTokenProvider.Builder builder()
Get a builder for defining aDefaultAwsTokenProvider
with custom configuration.
-
resolveToken
public SdkToken resolveToken()
Description copied from interface:SdkTokenProvider
Returns anSdkToken
that 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:
resolveToken
in interfaceSdkTokenProvider
- Returns:
- AwsToken which the caller can use to authorize an AWS request using token authorization for a request.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSdkAutoCloseable
-
-