Class IdentitySource
Represents an identity source.
Inheritance
Namespace: Amazon.CDK.AWS.APIGateway
Assembly: Amazon.CDK.AWS.APIGateway.dll
Syntax (csharp)
public class IdentitySource : DeputyBase
Syntax (vb)
Public Class IdentitySource
Inherits DeputyBase
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
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
});
Synopsis
Constructors
IdentitySource() | |
IdentitySource(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
IdentitySource(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Context(String) | Provides a properly formatted request context identity source. |
Header(String) | Provides a properly formatted header identity source. |
QueryString(String) | Provides a properly formatted query string identity source. |
StageVariable(String) | Provides a properly formatted API Gateway stage variable identity source. |
Constructors
IdentitySource()
public IdentitySource()
IdentitySource(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected IdentitySource(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
IdentitySource(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected IdentitySource(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Context(String)
Provides a properly formatted request context identity source.
public static string Context(string context)
Parameters
- context System.String
the name of the context variable the
IdentitySource
will represent.
Returns
System.String
a request context identity source.
Header(String)
Provides a properly formatted header identity source.
public static string Header(string headerName)
Parameters
- headerName System.String
the name of the header the
IdentitySource
will represent.
Returns
System.String
a header identity source.
QueryString(String)
Provides a properly formatted query string identity source.
public static string QueryString(string queryString)
Parameters
- queryString System.String
the name of the query string the
IdentitySource
will represent.
Returns
System.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 System.String
the name of the stage variable the
IdentitySource
will represent.
Returns
System.String
an API Gateway stage variable identity source.