Class HttpNoneAuthorizer

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.apigatewayv2.HttpNoneAuthorizer
All Implemented Interfaces:
IHttpRouteAuthorizer, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-11T15:55:52.682Z") @Stability(Stable) public class HttpNoneAuthorizer extends software.amazon.jsii.JsiiObject implements IHttpRouteAuthorizer
Explicitly configure no authorizers on specific HTTP API routes.

Example:

 import software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpJwtAuthorizer;
 import software.amazon.awscdk.aws_apigatewayv2_integrations.HttpUrlIntegration;
 String issuer = "https://test.us.auth0.com";
 HttpJwtAuthorizer authorizer = HttpJwtAuthorizer.Builder.create("DefaultAuthorizer", issuer)
         .jwtAudience(List.of("3131231"))
         .build();
 HttpApi api = HttpApi.Builder.create(this, "HttpApi")
         .defaultAuthorizer(authorizer)
         .defaultAuthorizationScopes(List.of("read:books"))
         .build();
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.example.com"))
         .path("/books")
         .methods(List.of(HttpMethod.GET))
         .build());
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIdIntegration", "https://get-books-proxy.example.com"))
         .path("/books/{id}")
         .methods(List.of(HttpMethod.GET))
         .build());
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.example.com"))
         .path("/books")
         .methods(List.of(HttpMethod.POST))
         .authorizationScopes(List.of("write:books"))
         .build());
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("LoginIntegration", "https://get-books-proxy.example.com"))
         .path("/login")
         .methods(List.of(HttpMethod.POST))
         .authorizer(new HttpNoneAuthorizer())
         .build());
 
  • Constructor Details

    • HttpNoneAuthorizer

      protected HttpNoneAuthorizer(software.amazon.jsii.JsiiObjectRef objRef)
    • HttpNoneAuthorizer

      protected HttpNoneAuthorizer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • HttpNoneAuthorizer

      @Stability(Stable) public HttpNoneAuthorizer()
  • Method Details