@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.203Z") @Stability(value=Stable) public interface RequestAuthorizerProps extends software.amazon.jsii.JsiiSerializable, LambdaAuthorizerProps
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());
| Modifier and Type | Interface and Description |
|---|---|
static class |
RequestAuthorizerProps.Builder
A builder for
RequestAuthorizerProps |
static class |
RequestAuthorizerProps.Jsii$Proxy
An implementation for
RequestAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static RequestAuthorizerProps.Builder |
builder() |
List<String> |
getIdentitySources()
An array of request header mapping expressions for identities.
|
getAssumeRole, getAuthorizerName, getHandler, getResultsCacheTtl@Stability(value=Stable) @NotNull List<String> getIdentitySources()
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.
@Stability(value=Stable) static RequestAuthorizerProps.Builder builder()
builder in interface LambdaAuthorizerPropsRequestAuthorizerProps.Builder of RequestAuthorizerPropsCopyright © 2022. All rights reserved.