Class: AWSCDK::APIGatewayv2Authorizers::HttpJwtAuthorizerProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
api_gatewayv2_authorizers/http_jwt_authorizer_props.rb

Overview

Properties to initialize HttpJwtAuthorizer.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(jwt_audience:, authorizer_name: nil, identity_source: nil) ⇒ HttpJwtAuthorizerProps

Returns a new instance of HttpJwtAuthorizerProps.

Parameters:

  • jwt_audience (Array<String>)

    A list of the intended recipients of the JWT.

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

    The name of the authorizer.

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

    The identity source for which authorization is requested.



10
11
12
13
14
15
16
17
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 10

def initialize(jwt_audience:, authorizer_name: nil, identity_source: nil)
  @jwt_audience = jwt_audience
  Jsii::Type.check_type(@jwt_audience, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "jwtAudience")
  @authorizer_name = authorizer_name
  Jsii::Type.check_type(@authorizer_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizerName") unless @authorizer_name.nil?
  @identity_source = identity_source
  Jsii::Type.check_type(@identity_source, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "identitySource") unless @identity_source.nil?
end

Instance Attribute Details

#authorizer_nameString? (readonly)

Note:

Default: - same value as id passed in the constructor

The name of the authorizer.

Returns:

  • (String, nil)


29
30
31
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 29

def authorizer_name
  @authorizer_name
end

#identity_sourceArray<String>? (readonly)

Note:

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

The identity source for which authorization is requested.

Returns:

  • (Array<String>, nil)


34
35
36
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 34

def identity_source
  @identity_source
end

#jwt_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.

Returns:

  • (Array<String>)


24
25
26
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 24

def jwt_audience
  @jwt_audience
end

Class Method Details

.jsii_propertiesObject



36
37
38
39
40
41
42
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 36

def self.jsii_properties
  {
    :jwt_audience => "jwtAudience",
    :authorizer_name => "authorizerName",
    :identity_source => "identitySource",
  }
end

Instance Method Details

#to_jsiiObject



44
45
46
47
48
49
50
51
52
# File 'api_gatewayv2_authorizers/http_jwt_authorizer_props.rb', line 44

def to_jsii
  result = {}
  result.merge!({
    "jwtAudience" => @jwt_audience,
    "authorizerName" => @authorizer_name,
    "identitySource" => @identity_source,
  })
  result.compact
end