Interface SdkTokenProvider

All Superinterfaces:
IdentityProvider<TokenIdentity>
All Known Implementing Classes:
DefaultAwsTokenProvider, LazyTokenProvider, ProfileTokenProvider, SdkTokenProviderChain, SsoAccessTokenProvider, SsoOidcTokenProvider, StaticTokenProvider
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface SdkTokenProvider extends IdentityProvider<TokenIdentity>
Interface for loading SdkToken that are used for authentication.
  • Method Details

    • resolveToken

      SdkToken resolveToken()
      Returns an SdkToken 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.
      Returns:
      AwsToken which the caller can use to authorize an AWS request using token authorization for a request.
    • identityType

      default Class<TokenIdentity> identityType()
      Description copied from interface: IdentityProvider
      Retrieve the class of identity this identity provider produces. This is necessary for the SDK core to determine which identity provider should be used to resolve a specific type of identity.
      Specified by:
      identityType in interface IdentityProvider<TokenIdentity>
    • resolveIdentity

      default CompletableFuture<TokenIdentity> resolveIdentity(ResolveIdentityRequest request)
      Description copied from interface: IdentityProvider
      Resolve the identity from this identity provider.
      Specified by:
      resolveIdentity in interface IdentityProvider<TokenIdentity>
      Parameters:
      request - The request to resolve an Identity