Class: AWSCDK::Cognito::AllowedFirstAuthFactors
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::AllowedFirstAuthFactors
- Defined in:
- cognito/allowed_first_auth_factors.rb
Overview
The types of authentication that you want to allow for users' first authentication prompt.
Instance Attribute Summary collapse
-
#email_otp ⇒ Boolean?
readonly
Whether the email message one-time password is allowed.
-
#passkey ⇒ Boolean?
readonly
Whether the Passkey (WebAuthn) is allowed.
-
#password ⇒ Boolean
readonly
Whether the password authentication is allowed.
-
#sms_otp ⇒ Boolean?
readonly
Whether the SMS message one-time password is allowed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(password:, email_otp: nil, passkey: nil, sms_otp: nil) ⇒ AllowedFirstAuthFactors
constructor
A new instance of AllowedFirstAuthFactors.
- #to_jsii ⇒ Object
Constructor Details
#initialize(password:, email_otp: nil, passkey: nil, sms_otp: nil) ⇒ AllowedFirstAuthFactors
Returns a new instance of AllowedFirstAuthFactors.
13 14 15 16 17 18 19 20 21 22 |
# File 'cognito/allowed_first_auth_factors.rb', line 13 def initialize(password:, email_otp: nil, passkey: nil, sms_otp: nil) @password = password Jsii::Type.check_type(@password, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "password") @email_otp = email_otp Jsii::Type.check_type(@email_otp, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "emailOtp") unless @email_otp.nil? @passkey = passkey Jsii::Type.check_type(@passkey, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "passkey") unless @passkey.nil? @sms_otp = sms_otp Jsii::Type.check_type(@sms_otp, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "smsOtp") unless @sms_otp.nil? end |
Instance Attribute Details
#email_otp ⇒ Boolean? (readonly)
Note:
Default: false
Whether the email message one-time password is allowed.
34 35 36 |
# File 'cognito/allowed_first_auth_factors.rb', line 34 def email_otp @email_otp end |
#passkey ⇒ Boolean? (readonly)
Note:
Default: false
Whether the Passkey (WebAuthn) is allowed.
39 40 41 |
# File 'cognito/allowed_first_auth_factors.rb', line 39 def passkey @passkey end |
#password ⇒ Boolean (readonly)
Whether the password authentication is allowed.
This must be true.
29 30 31 |
# File 'cognito/allowed_first_auth_factors.rb', line 29 def password @password end |
#sms_otp ⇒ Boolean? (readonly)
Note:
Default: false
Whether the SMS message one-time password is allowed.
44 45 46 |
# File 'cognito/allowed_first_auth_factors.rb', line 44 def sms_otp @sms_otp end |
Class Method Details
.jsii_properties ⇒ Object
46 47 48 49 50 51 52 53 |
# File 'cognito/allowed_first_auth_factors.rb', line 46 def self.jsii_properties { :password => "password", :email_otp => "emailOtp", :passkey => "passkey", :sms_otp => "smsOtp", } end |
Instance Method Details
#to_jsii ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'cognito/allowed_first_auth_factors.rb', line 55 def to_jsii result = {} result.merge!({ "password" => @password, "emailOtp" => @email_otp, "passkey" => @passkey, "smsOtp" => @sms_otp, }) result.compact end |