Class StaticTokenProvider
- java.lang.Object
-
- software.amazon.awssdk.auth.token.credentials.StaticTokenProvider
-
- All Implemented Interfaces:
SdkTokenProvider,IdentityProvider<TokenIdentity>
@SdkPublicApi public final class StaticTokenProvider extends Object implements SdkTokenProvider
An implementation ofSdkTokenProviderthat returns a set implementation ofSdkToken.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StaticTokenProvidercreate(SdkToken token)Create a token provider that always returns the provided static token.SdkTokenresolveToken()Returns anSdkTokenthat can be used to authorize a request.StringtoString()-
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 StaticTokenProvider create(SdkToken token)
Create a token provider that always returns the provided static token.
-
resolveToken
public SdkToken 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.
-
-