Class AwsV4Converter
- java.lang.Object
-
- software.amazon.smithy.openapi.fromsmithy.security.AwsV4Converter
-
- All Implemented Interfaces:
SecuritySchemeConverter<SigV4Trait>
public final class AwsV4Converter extends java.lang.Object implements SecuritySchemeConverter<SigV4Trait>
Adds AWS signature version in a way that"s compatible with AWS API Gateway.
-
-
Constructor Summary
Constructors Constructor Description AwsV4Converter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SecurityScheme
createSecurityScheme(Context<? extends Trait> context, SigV4Trait trait)
Creates an OpenAPI security scheme.java.util.Set<java.lang.String>
getAuthRequestHeaders(Context<? extends Trait> context, SigV4Trait trait)
Gets the names of the headers set on HTTP requests used by this authentication scheme.java.lang.Class<SigV4Trait>
getAuthSchemeType()
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
-
-
-
-
Method Detail
-
getAuthSchemeType
public java.lang.Class<SigV4Trait> 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
public SecurityScheme createSecurityScheme(Context<? extends Trait> context, SigV4Trait trait)
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:
- Security Scheme Object
-
getAuthRequestHeaders
public java.util.Set<java.lang.String> getAuthRequestHeaders(Context<? extends Trait> context, SigV4Trait trait)
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.
-
-