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.84.0 (build 5404dcf)", date="2023-06-19T16:30:43.261Z") @Stability(Experimental) public class HttpNoneAuthorizer extends software.amazon.jsii.JsiiObject implements IHttpRouteAuthorizer
(experimental) Explicitly configure no authorizers on specific HTTP API routes.

Example:

 import software.amazon.awscdk.services.apigatewayv2.authorizers.HttpJwtAuthorizer;
 import software.amazon.awscdk.services.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.myproxy.internal"))
         .path("/books")
         .methods(List.of(HttpMethod.GET))
         .build());
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIdIntegration", "https://get-books-proxy.myproxy.internal"))
         .path("/books/{id}")
         .methods(List.of(HttpMethod.GET))
         .build());
 api.addRoutes(AddRoutesOptions.builder()
         .integration(new HttpUrlIntegration("BooksIntegration", "https://get-books-proxy.myproxy.internal"))
         .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.myproxy.internal"))
         .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(Experimental) public HttpNoneAuthorizer()
  • Method Details