Class HttpUserPoolAuthorizer
(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 HttpUserPoolAuthorizer : DeputyBase, IHttpRouteAuthorizer
Syntax (vb)
Public Class HttpUserPoolAuthorizer
Inherits DeputyBase
Implements IHttpRouteAuthorizer
Remarks
Stability: Experimental
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Cognito;
using Amazon.CDK.AWS.APIGatewayv2.Authorizers;
using Amazon.CDK.AWS.APIGatewayv2.Integrations;
var userPool = new UserPool(this, "UserPool");
var authorizer = new HttpUserPoolAuthorizer("BooksAuthorizer", userPool);
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
HttpUserPoolAuthorizer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpUserPoolAuthorizer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
HttpUserPoolAuthorizer(String, IUserPool, IHttpUserPoolAuthorizerProps) | (experimental) Initialize a Cognito user pool authorizer to be bound with HTTP route. |
Methods
Bind(IHttpRouteAuthorizerBindOptions) | (experimental) Bind this authorizer to a specified Http route. |
Constructors
HttpUserPoolAuthorizer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpUserPoolAuthorizer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpUserPoolAuthorizer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpUserPoolAuthorizer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
HttpUserPoolAuthorizer(String, IUserPool, IHttpUserPoolAuthorizerProps)
(experimental) Initialize a Cognito user pool authorizer to be bound with HTTP route.
public HttpUserPoolAuthorizer(string id, IUserPool pool, IHttpUserPoolAuthorizerProps props = null)
Parameters
- id System.String
The id of the underlying construct.
- pool IUserPool
The user pool to use for authorization.
- props IHttpUserPoolAuthorizerProps
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