Interface IdentityProviders
-
- All Superinterfaces:
ToCopyableBuilder<IdentityProviders.Builder,IdentityProviders>
- All Known Implementing Classes:
DefaultIdentityProviders
@SdkPublicApi public interface IdentityProviders extends ToCopyableBuilder<IdentityProviders.Builder,IdentityProviders>
An interface to allow retrieving anIdentityProviderbased on the identity type.IdentityProvidersis a registry that maps identity types to their corresponding identity providers. It is used bysoftware.amazon.awssdk.http.auth.spi.scheme.AuthSchemes to retrieve the appropriate identity provider for resolving authentication identities.How It Works
When an auth scheme needs to resolve an identity, it calls
identityProvider(Class)with the identity type it requires (e.g.,AwsCredentialsIdentity.class). The registry returns the corresponding provider that was configured on the client.Default Configuration
The SDK automatically configures identity providers based on the client configuration:
- When you set
credentialsProvider()on the client builder, it registers anAwsCredentialsIdentityprovider - When you set
tokenProvider()on the client builder, it registers aTokenIdentityprovider
Usage in Auth Schemes
Auth schemes use
IdentityProvidersto retrieve the appropriate identity provider for their identity type.Example - Auth scheme using IdentityProviders: {@snippet : public class CustomAuthScheme implements AwsV4AuthScheme {
- See Also:
IdentityProvider,Identity,software.amazon.awssdk.http.auth.spi.scheme.AuthScheme
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceIdentityProviders.BuilderA builder for aIdentityProviders.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static IdentityProviders.Builderbuilder()Get a new builder for creating aIdentityProviders.<T extends Identity>
IdentityProvider<T>identityProvider(Class<T> identityType)Retrieve an identity provider for the provided identity type.-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy, toBuilder
-
-
-
-
Method Detail
-
identityProvider
<T extends Identity> IdentityProvider<T> identityProvider(Class<T> identityType)
Retrieve an identity provider for the provided identity type.
-
builder
static IdentityProviders.Builder builder()
Get a new builder for creating aIdentityProviders.
-
-