Class: AWSCDK::Cognito::SignInAliases
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::SignInAliases
- Defined in:
- cognito/sign_in_aliases.rb
Overview
The different ways in which users of this pool can sign up or sign in.
Instance Attribute Summary collapse
-
#email ⇒ Boolean?
readonly
Whether a user is allowed to sign up or sign in with an email address.
-
#phone ⇒ Boolean?
readonly
Whether a user is allowed to sign up or sign in with a phone number.
-
#preferred_username ⇒ Boolean?
readonly
Whether a user is allowed to sign in with a secondary username, that can be set and modified after sign up.
-
#username ⇒ Boolean?
readonly
Whether user is allowed to sign up or sign in with a username.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(email: nil, phone: nil, preferred_username: nil, username: nil) ⇒ SignInAliases
constructor
A new instance of SignInAliases.
- #to_jsii ⇒ Object
Constructor Details
#initialize(email: nil, phone: nil, preferred_username: nil, username: nil) ⇒ SignInAliases
Returns a new instance of SignInAliases.
11 12 13 14 15 16 17 18 19 20 |
# File 'cognito/sign_in_aliases.rb', line 11 def initialize(email: nil, phone: nil, preferred_username: nil, username: 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? @preferred_username = preferred_username Jsii::Type.check_type(@preferred_username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "preferredUsername") unless @preferred_username.nil? @username = username Jsii::Type.check_type(@username, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "username") unless @username.nil? end |
Instance Attribute Details
#email ⇒ Boolean? (readonly)
Default: false
Whether a user is allowed to sign up or sign in with an email address.
26 27 28 |
# File 'cognito/sign_in_aliases.rb', line 26 def email @email end |
#phone ⇒ Boolean? (readonly)
Default: false
Whether a user is allowed to sign up or sign in with a phone number.
31 32 33 |
# File 'cognito/sign_in_aliases.rb', line 31 def phone @phone end |
#preferred_username ⇒ Boolean? (readonly)
Default: false
Whether a user is allowed to sign in with a secondary username, that can be set and modified after sign up.
Can only be used in conjunction with USERNAME.
38 39 40 |
# File 'cognito/sign_in_aliases.rb', line 38 def preferred_username @preferred_username end |
#username ⇒ Boolean? (readonly)
Default: true
Whether user is allowed to sign up or sign in with a username.
43 44 45 |
# File 'cognito/sign_in_aliases.rb', line 43 def username @username end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'cognito/sign_in_aliases.rb', line 45 def self.jsii_properties { :email => "email", :phone => "phone", :preferred_username => "preferredUsername", :username => "username", } end |
Instance Method Details
#to_jsii ⇒ Object
54 55 56 57 58 59 60 61 62 63 |
# File 'cognito/sign_in_aliases.rb', line 54 def to_jsii result = {} result.merge!({ "email" => @email, "phone" => @phone, "preferredUsername" => @preferred_username, "username" => @username, }) result.compact end |