Class HttpJwtAuthorizer.Builder

java.lang.Object
software.amazon.awscdk.aws_apigatewayv2_authorizers.HttpJwtAuthorizer.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<HttpJwtAuthorizer>
Enclosing class:
HttpJwtAuthorizer

@Stability(Stable) public static final class HttpJwtAuthorizer.Builder extends Object implements software.amazon.jsii.Builder<HttpJwtAuthorizer>
A fluent builder for HttpJwtAuthorizer.
  • Method Details

    • create

      @Stability(Stable) public static HttpJwtAuthorizer.Builder create(String id, String jwtIssuer)
      Parameters:
      id - The id of the underlying construct. This parameter is required.
      jwtIssuer - The base domain of the identity provider that issues JWT. This parameter is required.
      Returns:
      a new instance of HttpJwtAuthorizer.Builder.
    • jwtAudience

      @Stability(Stable) public HttpJwtAuthorizer.Builder jwtAudience(List<String> jwtAudience)
      A list of the intended recipients of the JWT.

      A valid JWT must provide an aud that matches at least one entry in this list.

      Parameters:
      jwtAudience - A list of the intended recipients of the JWT. This parameter is required.
      Returns:
      this
    • authorizerName

      @Stability(Stable) public HttpJwtAuthorizer.Builder authorizerName(String authorizerName)
      The name of the authorizer.

      Default: - same value as `id` passed in the constructor

      Parameters:
      authorizerName - The name of the authorizer. This parameter is required.
      Returns:
      this
    • identitySource

      @Stability(Stable) public HttpJwtAuthorizer.Builder identitySource(List<String> identitySource)
      The identity source for which authorization is requested.

      Default: ['$request.header.Authorization']

      Parameters:
      identitySource - The identity source for which authorization is requested. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public HttpJwtAuthorizer build()
      Specified by:
      build in interface software.amazon.jsii.Builder<HttpJwtAuthorizer>
      Returns:
      a newly built instance of HttpJwtAuthorizer.