Class: AWSCDK::Cognito::AutoVerifiedAttrs
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::AutoVerifiedAttrs
- Defined in:
- cognito/auto_verified_attrs.rb
Overview
Attributes that can be automatically verified for users in a user pool.
Instance Attribute Summary collapse
-
#email ⇒ Boolean?
readonly
Whether the email address of the user should be auto verified at sign up.
-
#phone ⇒ Boolean?
readonly
Whether the phone number of the user should be auto verified at sign up.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email: nil, phone: nil) ⇒ AutoVerifiedAttrs
constructor
A new instance of AutoVerifiedAttrs.
- #to_jsii ⇒ Object
Constructor Details
#initialize(email: nil, phone: nil) ⇒ AutoVerifiedAttrs
Returns a new instance of AutoVerifiedAttrs.
9 10 11 12 13 14 |
# File 'cognito/auto_verified_attrs.rb', line 9 def initialize(email: nil, phone: nil) @email = email Jsii::Type.check_type(@email, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "email") unless @email.nil? @phone = phone Jsii::Type.check_type(@phone, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "phone") unless @phone.nil? end |
Instance Attribute Details
#email ⇒ Boolean? (readonly)
Default: - true, if email is turned on for signIn. false, otherwise.
Whether the email address of the user should be auto verified at sign up.
Note: If both email and phone is set, Cognito only verifies the phone number. To also verify email, see here -
https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html
23 24 25 |
# File 'cognito/auto_verified_attrs.rb', line 23 def email @email end |
#phone ⇒ Boolean? (readonly)
Default: - true, if phone is turned on for signIn. false, otherwise.
Whether the phone number of the user should be auto verified at sign up.
28 29 30 |
# File 'cognito/auto_verified_attrs.rb', line 28 def phone @phone end |
Class Method Details
.jsii_properties ⇒ Object
30 31 32 33 34 35 |
# File 'cognito/auto_verified_attrs.rb', line 30 def self.jsii_properties { :email => "email", :phone => "phone", } end |
Instance Method Details
#to_jsii ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'cognito/auto_verified_attrs.rb', line 37 def to_jsii result = {} result.merge!({ "email" => @email, "phone" => @phone, }) result.compact end |