Interface AuthSchemeOption
-
- All Superinterfaces:
ToCopyableBuilder<AuthSchemeOption.Builder,AuthSchemeOption>
- All Known Implementing Classes:
DefaultAuthSchemeOption
@SdkPublicApi public interface AuthSchemeOption extends ToCopyableBuilder<AuthSchemeOption.Builder,AuthSchemeOption>
An authentication scheme option, composed of the scheme ID and properties for use when resolving the identity and signing the request.Auth scheme options are returned by
AuthSchemeProviders to specify which authentication schemes should be used for a request, along with the properties needed to configure the identity provider and signer. The SDK will attempt to use the schemes in the order they are returned.Each option contains:
- A scheme ID - Identifies which
AuthSchemeto use (e.g., "aws.auth#sigv4") - Identity properties - Configuration for the identity provider (e.g., account ID, role ARN)
- Signer properties - Configuration for the signer (e.g., signing name, region, algorithm parameters)
Using Auth Scheme Options
Auth scheme options are typically created and modified within custom
AuthSchemeProviderimplementations to customize authentication behavior.Example - Modifying signer properties in an auth scheme option: {@snippet : public class CustomSigningNameAuthSchemeProvider implements S3AuthSchemeProvider { private final S3AuthSchemeProvider delegate; public CustomSigningNameAuthSchemeProvider() { this.delegate = S3AuthSchemeProvider.defaultProvider(); }
- See Also:
AuthScheme,AuthSchemeProvider,SignerProperty,IdentityProperty
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAuthSchemeOption.BuilderA builder for aAuthSchemeOption.static interfaceAuthSchemeOption.IdentityPropertyConsumerInterface for operating on anIdentityPropertyvalue.static interfaceAuthSchemeOption.SignerPropertyConsumerInterface for operating on anSignerPropertyvalue.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AuthSchemeOption.Builderbuilder()Get a new builder for creating aAuthSchemeOption.voidforEachIdentityProperty(AuthSchemeOption.IdentityPropertyConsumer consumer)A method to operate on allIdentityPropertyvalues of this AuthSchemeOption.voidforEachSignerProperty(AuthSchemeOption.SignerPropertyConsumer consumer)A method to operate on allSignerPropertyvalues of this AuthSchemeOption.<T> TidentityProperty(IdentityProperty<T> property)Retrieve the value of anIdentityProperty.StringschemeId()Retrieve the scheme ID, a unique identifier for the authentication scheme (aws.auth#sigv4, smithy.api#httpBearerAuth).<T> TsignerProperty(SignerProperty<T> property)Retrieve the value of anSignerProperty.-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy, toBuilder
-
-
-
-
Method Detail
-
builder
static AuthSchemeOption.Builder builder()
Get a new builder for creating aAuthSchemeOption.
-
schemeId
String schemeId()
Retrieve the scheme ID, a unique identifier for the authentication scheme (aws.auth#sigv4, smithy.api#httpBearerAuth).
-
identityProperty
<T> T identityProperty(IdentityProperty<T> property)
Retrieve the value of anIdentityProperty.- Type Parameters:
T- The type of the IdentityProperty.- Parameters:
property- The IdentityProperty to retrieve the value of.
-
signerProperty
<T> T signerProperty(SignerProperty<T> property)
Retrieve the value of anSignerProperty.- Type Parameters:
T- The type of the SignerProperty.- Parameters:
property- The SignerProperty to retrieve the value of.
-
forEachIdentityProperty
void forEachIdentityProperty(AuthSchemeOption.IdentityPropertyConsumer consumer)
A method to operate on allIdentityPropertyvalues of this AuthSchemeOption.- Parameters:
consumer- The method to apply to each IdentityProperty.
-
forEachSignerProperty
void forEachSignerProperty(AuthSchemeOption.SignerPropertyConsumer consumer)
A method to operate on allSignerPropertyvalues of this AuthSchemeOption.- Parameters:
consumer- The method to apply to each SignerProperty.
-
-