Table of Contents

Class IdentitySource

Namespace
Amazon.CDK.AWS.APIGateway
Assembly
Amazon.CDK.AWS.APIGateway.dll

Represents an identity source.

public class IdentitySource : DeputyBase
Inheritance
IdentitySource

Examples

Function authFn;
             Resource books;


             var auth = new RequestAuthorizer(this, "booksAuthorizer", new RequestAuthorizerProps {
                 Handler = authFn,
                 IdentitySources = new [] { IdentitySource.Header("Authorization") }
             });

             books.AddMethod("GET", new HttpIntegration("http://amazon.com"), new MethodOptions {
                 Authorizer = auth
             });

Remarks

The source can be specified either as a literal value (e.g: Auth) which cannot be blank, or as an unresolved string token.

ExampleMetadata: infused

Constructors

IdentitySource()

public IdentitySource()

Methods

Context(string)

Provides a properly formatted request context identity source.

public static string Context(string context)

Parameters

context string

the name of the context variable the IdentitySource will represent.

Returns

string

a request context identity source.

Header(string)

Provides a properly formatted header identity source.

public static string Header(string headerName)

Parameters

headerName string

the name of the header the IdentitySource will represent.

Returns

string

a header identity source.

QueryString(string)

Provides a properly formatted query string identity source.

public static string QueryString(string queryString)

Parameters

queryString string

the name of the query string the IdentitySource will represent.

Returns

string

a query string identity source.

StageVariable(string)

Provides a properly formatted API Gateway stage variable identity source.

public static string StageVariable(string stageVariable)

Parameters

stageVariable string

the name of the stage variable the IdentitySource will represent.

Returns

string

an API Gateway stage variable identity source.