Class CognitoUserPoolsAuthorizerProps
Properties for CognitoUserPoolsAuthorizer.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CognitoUserPoolsAuthorizerProps : Object, ICognitoUserPoolsAuthorizerProps
Syntax (vb)
Public Class CognitoUserPoolsAuthorizerProps
Inherits Object
Implements ICognitoUserPoolsAuthorizerProps
Remarks
ExampleMetadata: infused
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
});
Synopsis
Constructors
CognitoUserPoolsAuthorizerProps() |
Properties
AuthorizerName | An optional human friendly name for the authorizer. |
CognitoUserPools | The user pools to associate with this authorizer. |
IdentitySource | The request header mapping expression for the bearer token. |
ResultsCacheTtl | How long APIGateway should cache the results. |
Constructors
CognitoUserPoolsAuthorizerProps()
public CognitoUserPoolsAuthorizerProps()
Properties
AuthorizerName
An optional human friendly name for the authorizer.
public string AuthorizerName { get; set; }
Property Value
System.String
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
IdentitySource
The request header mapping expression for the bearer token.
public string IdentitySource { get; set; }
Property Value
System.String
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
Remarks
Max 1 hour. Disable caching by setting this to 0.
Default: Duration.minutes(5)