Experimental
@aws-cdk/aws-bedrock-agentcore-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
CognitoAuthorizerProps Struct
Properties for configuring a Cognito authorizer.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_agentcore_alpha from '@aws-cdk/aws-bedrock-agentcore-alpha';
import { aws_cognito as cognito } from 'aws-cdk-lib';
declare const gatewayCustomClaim: bedrock_agentcore_alpha.GatewayCustomClaim;
declare const userPool: cognito.UserPool;
declare const userPoolClient: cognito.UserPoolClient;
const cognitoAuthorizerProps: bedrock_agentcore_alpha.CognitoAuthorizerProps = {
userPool: userPool,
// the properties below are optional
allowedAudiences: ['allowedAudiences'],
allowedClients: [userPoolClient],
allowedScopes: ['allowedScopes'],
customClaims: [gatewayCustomClaim],
};
Properties
allowedAudiencesoptionalstring[]allowed_audiencesoptionaltyping.List[str]allowedAudiencesoptionalList<String>AllowedAudiencesoptionalstring[]AllowedAudiencesoptional*[]*string#The allowed audiences for JWT validation.
Default: No audience validation
allowedClientsoptionalIUserPoolClient[]allowed_clientsoptionaltyping.List[IUserPoolClient]allowedClientsoptionalList<IUserPoolClient>AllowedClientsoptionalIUserPoolClient[]AllowedClientsoptional*[]IUserPoolClient#The allowed User Pool clients.
Default: All clients are allowed
allowedScopesoptionalstring[]allowed_scopesoptionaltyping.List[str]allowedScopesoptionalList<String>AllowedScopesoptionalstring[]AllowedScopesoptional*[]*string#The allowed scopes for JWT validation.
Default: No scope validation
customClaimsoptionalGatewayCustomClaim[]custom_claimsoptionaltyping.List[GatewayCustomClaim]customClaimsoptionalList<GatewayCustomClaim>CustomClaimsoptionalGatewayCustomClaim[]CustomClaimsoptional*[]GatewayCustomClaim#Custom claims for additional JWT token validation.
Default: No custom claim validation
Allows you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations.