Class: AWSCDK::APIGatewayv2::CfnAuthorizer::JWTConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2/cfn_authorizer.rb

Overview

The JWTConfiguration property specifies the configuration of a JWT authorizer.

Required for the JWT authorizer type. Supported only for HTTP APIs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(audience: nil, issuer: nil) ⇒ JWTConfigurationProperty

Returns a new instance of JWTConfigurationProperty.

Parameters:

  • audience (Array<String>, nil) (defaults to: nil)

    A list of the intended recipients of the JWT.

  • issuer (String, nil) (defaults to: nil)

    The base domain of the identity provider that issues JSON Web Tokens.



636
637
638
639
640
641
# File 'api_gatewayv2/cfn_authorizer.rb', line 636

def initialize(audience: nil, issuer: nil)
  @audience = audience
  Jsii::Type.check_type(@audience, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "audience") unless @audience.nil?
  @issuer = issuer
  Jsii::Type.check_type(@issuer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "issuer") unless @issuer.nil?
end

Instance Attribute Details

#audienceArray<String>? (readonly)

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. See RFC 7519 . Required for the JWT authorizer type. Supported only for HTTP APIs.



649
650
651
# File 'api_gatewayv2/cfn_authorizer.rb', line 649

def audience
  @audience
end

#issuerString? (readonly)

The base domain of the identity provider that issues JSON Web Tokens.

For example, an Amazon Cognito user pool has the following format: https://cognito-idp. {region} .amazonaws.com/ {userPoolId} . Required for the JWT authorizer type. Supported only for HTTP APIs.



656
657
658
# File 'api_gatewayv2/cfn_authorizer.rb', line 656

def issuer
  @issuer
end

Class Method Details

.jsii_propertiesObject



658
659
660
661
662
663
# File 'api_gatewayv2/cfn_authorizer.rb', line 658

def self.jsii_properties
  {
    :audience => "audience",
    :issuer => "issuer",
  }
end

Instance Method Details

#to_jsiiObject



665
666
667
668
669
670
671
672
# File 'api_gatewayv2/cfn_authorizer.rb', line 665

def to_jsii
  result = {}
  result.merge!({
    "audience" => @audience,
    "issuer" => @issuer,
  })
  result.compact
end