Interface RequestAuthorizerProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,LambdaAuthorizerProps
- All Known Implementing Classes:
RequestAuthorizerProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)",
date="2023-06-19T16:30:45.054Z")
@Stability(Stable)
public interface RequestAuthorizerProps
extends software.amazon.jsii.JsiiSerializable, LambdaAuthorizerProps
Properties for RequestAuthorizer.
Example:
Function authFn; Resource books; RequestAuthorizer auth = RequestAuthorizer.Builder.create(this, "booksAuthorizer") .handler(authFn) .identitySources(List.of(IdentitySource.header("Authorization"))) .build(); books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder() .authorizer(auth) .build());
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic final class
A builder forRequestAuthorizerProps
static final class
An implementation forRequestAuthorizerProps
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
An array of request header mapping expressions for identities.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
Methods inherited from interface software.amazon.awscdk.services.apigateway.LambdaAuthorizerProps
getAssumeRole, getAuthorizerName, getHandler, getResultsCacheTtl
-
Method Details
-
getIdentitySources
An array of request header mapping expressions for identities.Supported parameter types are Header, Query String, Stage Variable, and Context. For instance, extracting an authorization token from a header would use the identity source
IdentitySource.header('Authorizer')
.Note: API Gateway uses the specified identity sources as the request authorizer caching key. When caching is enabled, API Gateway calls the authorizer's Lambda function only after successfully verifying that all the specified identity sources are present at runtime. If a specified identify source is missing, null, or empty, API Gateway returns a 401 Unauthorized response without calling the authorizer Lambda function.
-
builder
- Returns:
- a
RequestAuthorizerProps.Builder
ofRequestAuthorizerProps
-