@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:36.241Z") @Stability(value=Stable) public interface TokenAuthorizerProps extends software.amazon.jsii.JsiiSerializable, LambdaAuthorizerProps
Example:
Function authFn;
Resource books;
TokenAuthorizer auth = TokenAuthorizer.Builder.create(this, "booksAuthorizer")
.handler(authFn)
.build();
books.addMethod("GET", new HttpIntegration("http://amazon.com"), MethodOptions.builder()
.authorizer(auth)
.build());
| Modifier and Type | Interface and Description |
|---|---|
static class |
TokenAuthorizerProps.Builder
A builder for
TokenAuthorizerProps |
static class |
TokenAuthorizerProps.Jsii$Proxy
An implementation for
TokenAuthorizerProps |
| Modifier and Type | Method and Description |
|---|---|
static TokenAuthorizerProps.Builder |
builder() |
default String |
getIdentitySource()
The request header mapping expression for the bearer token.
|
default String |
getValidationRegex()
An optional regex to be matched against the authorization token.
|
getAssumeRole, getAuthorizerName, getHandler, getResultsCacheTtl@Stability(value=Stable) @Nullable default String getIdentitySource()
This is typically passed as part of the header, in which case
this should be method.request.header.Authorizer where Authorizer is the header containing the bearer token.
Default: `IdentitySource.header('Authorization')`
@Stability(value=Stable) @Nullable default String getValidationRegex()
When matched the authorizer lambda is invoked, otherwise a 401 Unauthorized is returned to the client.
Default: - no regex filter will be applied.
@Stability(value=Stable) static TokenAuthorizerProps.Builder builder()
builder in interface LambdaAuthorizerPropsTokenAuthorizerProps.Builder of TokenAuthorizerPropsCopyright © 2022. All rights reserved.