Class CognitoUserPoolsAuthorizerProps
- Namespace
- Amazon.CDK.AWS.APIGateway
- Assembly
- Amazon.CDK.AWS.APIGateway.dll
Properties for CognitoUserPoolsAuthorizer.
public class CognitoUserPoolsAuthorizerProps : ICognitoUserPoolsAuthorizerProps
- Inheritance
-
CognitoUserPoolsAuthorizerProps
- Implements
- Inherited Members
Examples
Resource books;
var userPool = new UserPool(this, "UserPool");
var auth = new CognitoUserPoolsAuthorizer(this, "booksAuthorizer", new CognitoUserPoolsAuthorizerProps {
CognitoUserPools = new [] { userPool }
});
books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
Authorizer = auth,
AuthorizationType = AuthorizationType.COGNITO
});
Remarks
ExampleMetadata: infused
Constructors
CognitoUserPoolsAuthorizerProps()
public CognitoUserPoolsAuthorizerProps()
Properties
AuthorizerName
An optional human friendly name for the authorizer.
public string? AuthorizerName { get; set; }
Property Value
Remarks
Note that, this is not the primary identifier of the authorizer.
Default: - the unique construct ID
CognitoUserPools
The user pools to associate with this authorizer.
public IUserPool[] CognitoUserPools { get; set; }
Property Value
- IUserPool[]
IdentitySource
The request header mapping expression for the bearer token.
public string? IdentitySource { get; set; }
Property Value
Remarks
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')
See: https://docs.aws.amazon.com/apigateway/api-reference/link-relation/authorizer-create/#identitySource
ResultsCacheTtl
How long APIGateway should cache the results.
public Duration? ResultsCacheTtl { get; set; }
Property Value
- Duration
Remarks
Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)