Class: AWSCDK::APIGatewayv2Authorizers::HttpUserPoolAuthorizerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::APIGatewayv2Authorizers::HttpUserPoolAuthorizerProps
- Defined in:
- api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb
Overview
Properties to initialize HttpUserPoolAuthorizer.
Instance Attribute Summary collapse
-
#authorizer_name ⇒ String?
readonly
Friendly name of the authorizer.
-
#identity_source ⇒ Array<String>?
readonly
The identity source for which authorization is requested.
-
#user_pool_clients ⇒ Array<AWSCDK::Cognito::IUserPoolClient>?
readonly
The user pool clients that should be used to authorize requests with the user pool.
-
#user_pool_region ⇒ String?
readonly
The AWS region in which the user pool is present.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(authorizer_name: nil, identity_source: nil, user_pool_clients: nil, user_pool_region: nil) ⇒ HttpUserPoolAuthorizerProps
constructor
A new instance of HttpUserPoolAuthorizerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(authorizer_name: nil, identity_source: nil, user_pool_clients: nil, user_pool_region: nil) ⇒ HttpUserPoolAuthorizerProps
Returns a new instance of HttpUserPoolAuthorizerProps.
11 12 13 14 15 16 17 18 19 20 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 11 def initialize(authorizer_name: nil, identity_source: nil, user_pool_clients: nil, user_pool_region: nil) @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? @user_pool_clients = user_pool_clients Jsii::Type.check_type(@user_pool_clients, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLklVc2VyUG9vbENsaWVudCJ9LCJraW5kIjoiYXJyYXkifX0=")), "userPoolClients") unless @user_pool_clients.nil? @user_pool_region = user_pool_region Jsii::Type.check_type(@user_pool_region, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "userPoolRegion") unless @user_pool_region.nil? end |
Instance Attribute Details
#authorizer_name ⇒ String? (readonly)
Default: - same value as id passed in the constructor
Friendly name of the authorizer.
26 27 28 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 26 def @authorizer_name end |
#identity_source ⇒ Array<String>? (readonly)
Default: ['$request.header.Authorization']
The identity source for which authorization is requested.
31 32 33 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 31 def identity_source @identity_source end |
#user_pool_clients ⇒ Array<AWSCDK::Cognito::IUserPoolClient>? (readonly)
Default: - a new client will be created for the given user pool
The user pool clients that should be used to authorize requests with the user pool.
36 37 38 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 36 def user_pool_clients @user_pool_clients end |
#user_pool_region ⇒ String? (readonly)
Default: - same region as the Route the authorizer is attached to.
The AWS region in which the user pool is present.
41 42 43 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 41 def user_pool_region @user_pool_region end |
Class Method Details
.jsii_properties ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 43 def self.jsii_properties { :authorizer_name => "authorizerName", :identity_source => "identitySource", :user_pool_clients => "userPoolClients", :user_pool_region => "userPoolRegion", } end |
Instance Method Details
#to_jsii ⇒ Object
52 53 54 55 56 57 58 59 60 61 |
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer_props.rb', line 52 def to_jsii result = {} result.merge!({ "authorizerName" => @authorizer_name, "identitySource" => @identity_source, "userPoolClients" => @user_pool_clients, "userPoolRegion" => @user_pool_region, }) result.compact end |