Interface TokenAuthorizerProps
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
,LambdaAuthorizerProps
- All Known Implementing Classes:
TokenAuthorizerProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.109.0 (build c221850)",
date="2025-03-19T18:01:28.601Z")
@Stability(Stable)
public interface TokenAuthorizerProps
extends software.amazon.jsii.JsiiSerializable, LambdaAuthorizerProps
Properties for TokenAuthorizer.
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());
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
A builder forTokenAuthorizerProps
static final class
An implementation forTokenAuthorizerProps
-
Method Summary
Modifier and TypeMethodDescriptionstatic TokenAuthorizerProps.Builder
builder()
default String
The request header mapping expression for the bearer token.default String
An optional regex to be matched against the authorization token.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
-
getIdentitySource
The request header mapping expression for the bearer token.This is typically passed as part of the header, in which case this should be
method.request.header.Authorizer
whereAuthorizer
is the header containing the bearer token.Default: `IdentitySource.header('Authorization')`
- See Also:
-
getValidationRegex
An optional regex to be matched against the authorization token.When matched the authorizer lambda is invoked, otherwise a 401 Unauthorized is returned to the client.
Default: - no regex filter will be applied.
-
builder
- Returns:
- a
TokenAuthorizerProps.Builder
ofTokenAuthorizerProps
-