Class: AWSCDK::Cognito::SignInPolicy

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/sign_in_policy.rb

Overview

Sign-in policy for User Pools.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(allowed_first_auth_factors: nil) ⇒ SignInPolicy

Returns a new instance of SignInPolicy.

Parameters:



8
9
10
11
# File 'cognito/sign_in_policy.rb', line 8

def initialize(allowed_first_auth_factors: nil)
  @allowed_first_auth_factors = allowed_first_auth_factors.is_a?(Hash) ? ::AWSCDK::Cognito::AllowedFirstAuthFactors.new(**allowed_first_auth_factors.transform_keys(&:to_sym)) : allowed_first_auth_factors
  Jsii::Type.check_type(@allowed_first_auth_factors, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5BbGxvd2VkRmlyc3RBdXRoRmFjdG9ycyJ9")), "allowedFirstAuthFactors") unless @allowed_first_auth_factors.nil?
end

Instance Attribute Details

#allowed_first_auth_factorsAWSCDK::Cognito::AllowedFirstAuthFactors? (readonly)

Note:

Default: - Password only

The types of authentication that you want to allow for users' first authentication prompt.



18
19
20
# File 'cognito/sign_in_policy.rb', line 18

def allowed_first_auth_factors
  @allowed_first_auth_factors
end

Class Method Details

.jsii_propertiesObject



20
21
22
23
24
# File 'cognito/sign_in_policy.rb', line 20

def self.jsii_properties
  {
    :allowed_first_auth_factors => "allowedFirstAuthFactors",
  }
end

Instance Method Details

#to_jsiiObject



26
27
28
29
30
31
32
# File 'cognito/sign_in_policy.rb', line 26

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