Class: AWSCDK::APIGatewayv2Authorizers::HttpUserPoolAuthorizer

Inherits:
Jsii::Object
  • Object
show all
Includes:
AWSCDK::APIGatewayv2::IHttpRouteAuthorizer
Defined in:
api_gatewayv2_authorizers/http_user_pool_authorizer.rb

Overview

Authorize Http Api routes on whether the requester is registered as part of an AWS Cognito user pool.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, pool, props = nil) ⇒ HttpUserPoolAuthorizer

Initialize a Cognito user pool authorizer to be bound with HTTP route.

Parameters:



14
15
16
17
18
19
20
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer.rb', line 14

def initialize(id, pool, props = nil)
  props = props.is_a?(Hash) ? ::AWSCDK::APIGatewayv2Authorizers::HttpUserPoolAuthorizerProps.new(**props.transform_keys(&:to_sym)) : props
  Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id")
  Jsii::Type.check_type(pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2wifQ==")), "pool")
  Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyX2F1dGhvcml6ZXJzLkh0dHBVc2VyUG9vbEF1dGhvcml6ZXJQcm9wcyJ9")), "props") unless props.nil?
  Jsii::Object.instance_method(:initialize).bind(self).call(id, pool, props)
end

Class Method Details

.jsii_overridable_methodsObject



22
23
24
25
26
27
28
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer.rb', line 22

def self.jsii_overridable_methods
  {
    :authorization_type => { kind: :property, name: "authorizationType", is_optional: false },
    :authorizer_id => { kind: :property, name: "authorizerId", is_optional: false },
    :bind => { kind: :method, name: "bind", is_optional: false },
  }
end

Instance Method Details

#authorization_typeString

The authorizationType used for UserPool Authorizer.

Returns:

  • (String)


33
34
35
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer.rb', line 33

def authorization_type()
  jsii_get_property("authorizationType")
end

#authorizer_idString

Return the id of the authorizer if it's been constructed.

Returns:

  • (String)


40
41
42
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer.rb', line 40

def authorizer_id()
  jsii_get_property("authorizerId")
end

#bind(options) ⇒ AWSCDK::APIGatewayv2::HttpRouteAuthorizerConfig

Bind this authorizer to a specified Http route.



48
49
50
51
52
# File 'api_gatewayv2_authorizers/http_user_pool_authorizer.rb', line 48

def bind(options)
  options = options.is_a?(Hash) ? ::AWSCDK::APIGatewayv2::HttpRouteAuthorizerBindOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXBpZ2F0ZXdheXYyLkh0dHBSb3V0ZUF1dGhvcml6ZXJCaW5kT3B0aW9ucyJ9")), "options")
  jsii_call_method("bind", [options])
end