Class HttpNoneAuthorizer
(experimental) Explicitly configure no authorizers on specific HTTP API routes.
Inheritance
System.Object
HttpNoneAuthorizer
Implements
Namespace: Amazon.CDK.AWS.APIGatewayv2
Assembly: Amazon.CDK.AWS.APIGatewayv2.dll
Syntax (csharp)
public class HttpNoneAuthorizer : DeputyBase, IHttpRouteAuthorizer
Syntax (vb)
Public Class HttpNoneAuthorizer
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("DefaultAuthorizer", issuer, new HttpJwtAuthorizerProps {
JwtAudience = new [] { "3131231" }
});
var api = new HttpApi(this, "HttpApi", new HttpApiProps {
DefaultAuthorizer = authorizer,
DefaultAuthorizationScopes = new [] { "read:books" }
});
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/books",
Methods = new [] { HttpMethod.GET }
});
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("BooksIdIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/books/{id}",
Methods = new [] { HttpMethod.GET }
});
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/books",
Methods = new [] { HttpMethod.POST },
AuthorizationScopes = new [] { "write:books" }
});
api.AddRoutes(new AddRoutesOptions {
Integration = new HttpUrlIntegration("LoginIntegration", "https://get-books-proxy.myproxy.internal"),
Path = "/login",
Methods = new [] { HttpMethod.POST },
Authorizer = new HttpNoneAuthorizer()
});
Synopsis
Constructors
HttpNoneAuthorizer() | |
HttpNoneAuthorizer(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
HttpNoneAuthorizer(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(IHttpRouteAuthorizerBindOptions) | (experimental) Bind this authorizer to a specified Http route. |
Constructors
HttpNoneAuthorizer()
public HttpNoneAuthorizer()
Remarks
Stability: Experimental
HttpNoneAuthorizer(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected HttpNoneAuthorizer(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
HttpNoneAuthorizer(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected HttpNoneAuthorizer(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(IHttpRouteAuthorizerBindOptions)
(experimental) Bind this authorizer to a specified Http route.
public virtual IHttpRouteAuthorizerConfig Bind(IHttpRouteAuthorizerBindOptions _)
Parameters
Returns
Remarks
Stability: Experimental