@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:23.459Z") @Stability(value=Experimental) 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()
(experimental) The request header mapping expression for the bearer token.
|
default String |
getValidationRegex()
(experimental) An optional regex to be matched against the authorization token.
|
getAssumeRole, getAuthorizerName, getHandler, getResultsCacheTtl@Stability(value=Experimental) @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')`
https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource@Stability(value=Experimental) @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=Experimental) static TokenAuthorizerProps.Builder builder()
builder in interface LambdaAuthorizerPropsTokenAuthorizerProps.Builder of TokenAuthorizerPropsCopyright © 2022. All rights reserved.