Class HttpJwtAuthorizer
(experimental) Authorize Http Api routes on whether the requester is registered as part of an AWS Cognito user pool.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.APIGatewayv2.Authorizers
Assembly: Amazon.CDK.AWS.APIGatewayv2.Authorizers.dll
Syntax (csharp)
public class HttpJwtAuthorizer : DeputyBase, IHttpRouteAuthorizer
Syntax (vb)
Public Class HttpJwtAuthorizer
Inherits DeputyBase
Implements IHttpRouteAuthorizer
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.APIGatewayv2.Authorizers;
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
var issuer = "https://test.us.auth0.com";
var authorizer = new HttpJwtAuthorizer("BooksAuthorizer", issuer, new HttpJwtAuthorizerProps {
JwtAudience = new [] { "3131231" }
});
var api = new HttpApi(this, "HttpApi");
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/books",
Authorizer = authorizer
});
Synopsis
Constructors
HttpJwtAuthorizer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpJwtAuthorizer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
HttpJwtAuthorizer(String, String, IHttpJwtAuthorizerProps) | (experimental) Initialize a JWT authorizer to be bound with HTTP route. |
Methods
Bind(IHttpRouteAuthorizerBindOptions) | (experimental) Bind this authorizer to a specified Http route. |
Constructors
HttpJwtAuthorizer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpJwtAuthorizer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpJwtAuthorizer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpJwtAuthorizer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
HttpJwtAuthorizer(String, String, IHttpJwtAuthorizerProps)
(experimental) Initialize a JWT authorizer to be bound with HTTP route.
public HttpJwtAuthorizer(string id, string jwtIssuer, IHttpJwtAuthorizerProps props)
Parameters
- id System.String
The id of the underlying construct.
- jwtIssuer System.String
The base domain of the identity provider that issues JWT.
- props IHttpJwtAuthorizerProps
Properties to configure the authorizer.
Remarks
Stability: Experimental
Methods
Bind(IHttpRouteAuthorizerBindOptions)
(experimental) Bind this authorizer to a specified Http route.
public virtual IHttpRouteAuthorizerConfig Bind(IHttpRouteAuthorizerBindOptions options)
Parameters
- options IHttpRouteAuthorizerBindOptions
Returns
Remarks
Stability: Experimental