Interface IdentityProvider<IdentityT extends Identity>


@SdkPublicApi @ThreadSafe public interface IdentityProvider<IdentityT extends Identity>
Interface for loading Identity that is used for authentication.

Identity providers are responsible for resolving credentials, tokens, or other authentication identities that are used by signers to authenticate requests. The SDK provides built-in identity providers for common identity types like AwsCredentialsIdentity and TokenIdentity.

Common Built-in Identity Providers

  • DefaultCredentialsProvider - Resolves AWS credentials from the default credential chain
  • StaticCredentialsProvider - Provides static AWS credentials
  • ProfileCredentialsProvider - Resolves credentials from AWS profiles
  • StsAssumeRoleCredentialsProvider - Assumes an IAM role using STS

How Identity Providers Work

Identity providers are selected by software.amazon.awssdk.http.auth.spi.scheme.AuthSchemes based on the identity type they produce. The SDK matches the identity type required by the auth scheme with the appropriate provider from IdentityProviders.

Implementing a Custom Identity Provider

You can implement custom identity providers for specialized authentication scenarios, such as retrieving credentials from a custom credential store or implementing a custom token provider.

Example - Custom credentials provider:

Using Identity Properties

Identity providers can read IdentityProperty values from the ResolveIdentityRequest to customize identity resolution based on request-specific parameters.

Example - Identity provider using properties:

See Also: