Show / Hide Table of Contents

Interface ICognitoUserPoolsAuthorizerProps

Properties for CognitoUserPoolsAuthorizer.

Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface ICognitoUserPoolsAuthorizerProps
Syntax (vb)
Public Interface 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

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.

Properties

AuthorizerName

An optional human friendly name for the authorizer.

virtual string AuthorizerName { get; }
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.

IUserPool[] CognitoUserPools { get; }
Property Value

IUserPool[]

IdentitySource

The request header mapping expression for the bearer token.

virtual string IdentitySource { get; }
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.

virtual Duration ResultsCacheTtl { get; }
Property Value

Duration

Remarks

Max 1 hour. Disable caching by setting this to 0.

Default: Duration.minutes(5)

Back to top Generated by DocFX