@aws-cdk_aws-apigatewayv2-authorizers-alpha.HttpJwtAuthorizerProps

interface HttpJwtAuthorizerProps ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Apigatewayv2.Authorizers.Alpha.HttpJwtAuthorizerProps
Gogithub.com/aws/aws-cdk-go/awscdkapigatewayv2authorizersalpha/v2#HttpJwtAuthorizerProps
Javasoftware.amazon.awscdk.services.apigatewayv2.authorizers.alpha.HttpJwtAuthorizerProps
Pythonaws_cdk.aws_apigatewayv2_authorizers_alpha.HttpJwtAuthorizerProps
TypeScript (source)@aws-cdk/aws-apigatewayv2-authorizers-alpha ยป HttpJwtAuthorizerProps

Properties to initialize HttpJwtAuthorizer.

Example

import { HttpJwtAuthorizer } from '@aws-cdk/aws-apigatewayv2-authorizers-alpha';
import { HttpUrlIntegration } from '@aws-cdk/aws-apigatewayv2-integrations-alpha';

const issuer = 'https://test.us.auth0.com';
const authorizer = new HttpJwtAuthorizer('BooksAuthorizer', issuer, {
  jwtAudience: ['3131231'],
});

const api = new apigwv2.HttpApi(this, 'HttpApi');

api.addRoutes({
  integration: new HttpUrlIntegration('BooksIntegration', 'https://get-books-proxy.example.com'),
  path: '/books',
  authorizer,
});

Properties

NameTypeDescription
jwtAudience๐Ÿ”นstring[]A list of the intended recipients of the JWT.
authorizerName?๐Ÿ”นstringThe name of the authorizer.
identitySource?๐Ÿ”นstring[]The identity source for which authorization is requested.

jwtAudience๐Ÿ”น

Type: string[]

A list of the intended recipients of the JWT.

A valid JWT must provide an aud that matches at least one entry in this list.


authorizerName?๐Ÿ”น

Type: string (optional, default: same value as id passed in the constructor)

The name of the authorizer.


identitySource?๐Ÿ”น

Type: string[] (optional, default: ['$request.header.Authorization'])

The identity source for which authorization is requested.