Class LazyTokenProvider
java.lang.Object
software.amazon.awssdk.auth.token.internal.LazyTokenProvider
- All Implemented Interfaces:
AutoCloseable
,SdkTokenProvider
,IdentityProvider<TokenIdentity>
,SdkAutoCloseable
A wrapper for
SdkTokenProvider
that defers creation of the underlying provider until the first time the
SdkTokenProvider.resolveToken()
method is invoked.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static LazyTokenProvider
create
(Supplier<SdkTokenProvider> delegateConstructor) Returns anSdkToken
that can be used to authorize a request.toString()
Methods inherited from class java.lang.Object
equals, 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
-
Constructor Details
-
LazyTokenProvider
-
-
Method Details
-
create
-
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()Description copied from interface:SdkAutoCloseable
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceSdkAutoCloseable
-
toString
-