Class AwsV4Converter
java.lang.Object
software.amazon.smithy.openapi.fromsmithy.security.AwsV4Converter
- All Implemented Interfaces:
SecuritySchemeConverter<SigV4Trait>
Adds AWS signature version in a way that"s compatible with AWS API Gateway.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSecurityScheme
(Context<? extends Trait> context, SigV4Trait trait) Creates an OpenAPI security scheme.getAuthRequestHeaders
(Context<? extends Trait> context, SigV4Trait trait) Gets the names of the headers set on HTTP requests used by this authentication scheme.Get the U that matches this converter.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.smithy.openapi.fromsmithy.SecuritySchemeConverter
createSecurityRequirements, getAuthResponseHeaders, getAuthSchemeId, getOpenApiAuthSchemeName, usesHttpCredentials
-
Constructor Details
-
AwsV4Converter
public AwsV4Converter()
-
-
Method Details
-
getAuthSchemeType
Description copied from interface:SecuritySchemeConverter
Get the U that matches this converter.- Specified by:
getAuthSchemeType
in interfaceSecuritySchemeConverter<SigV4Trait>
- Returns:
- The Smithy security auth scheme ID.
-
createSecurityScheme
Description copied from interface:SecuritySchemeConverter
Creates an OpenAPI security scheme.- Specified by:
createSecurityScheme
in interfaceSecuritySchemeConverter<SigV4Trait>
- Parameters:
context
- Conversion context.trait
- Authentication trait to convert.- Returns:
- The generated security scheme
- See Also:
-
getAuthRequestHeaders
Description copied from interface:SecuritySchemeConverter
Gets the names of the headers set on HTTP requests used by this authentication scheme.This is useful when integrating with things like CORS.
- Specified by:
getAuthRequestHeaders
in interfaceSecuritySchemeConverter<SigV4Trait>
- Parameters:
context
- Context for the conversion.trait
- The auth trait that is being used.- Returns:
- A set of header names.
-