Class: AWSCDK::Cognito::CfnUserPool::UsernameConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Cognito::CfnUserPool::UsernameConfigurationProperty
- Defined in:
- cognito/cfn_user_pool.rb
Overview
Case sensitivity of the username input for the selected sign-in option.
When case sensitivity is set to False (case insensitive), users can sign in with any combination of capital and lowercase letters. For example, username , USERNAME , or UserName , or for email, email@example.com or EMaiL@eXamplE.Com . For most use cases, set case sensitivity to False (case insensitive) as a best practice. When usernames and email addresses are case insensitive, Amazon Cognito treats any variation in case as the same user, and prevents a case variation from being assigned to the same attribute for a different user.
Instance Attribute Summary collapse
-
#case_sensitive ⇒ Boolean, ...
readonly
Specifies whether user name case sensitivity will be applied for all users in the user pool through Amazon Cognito APIs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(case_sensitive: nil) ⇒ UsernameConfigurationProperty
constructor
A new instance of UsernameConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(case_sensitive: nil) ⇒ UsernameConfigurationProperty
Returns a new instance of UsernameConfigurationProperty.
2251 2252 2253 2254 |
# File 'cognito/cfn_user_pool.rb', line 2251 def initialize(case_sensitive: nil) @case_sensitive = case_sensitive Jsii::Type.check_type(@case_sensitive, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "caseSensitive") unless @case_sensitive.nil? end |
Instance Attribute Details
#case_sensitive ⇒ Boolean, ... (readonly)
Specifies whether user name case sensitivity will be applied for all users in the user pool through Amazon Cognito APIs.
For most use cases, set case sensitivity to False (case insensitive) as a best practice. When usernames and email addresses are case insensitive, users can sign in as the same user when they enter a different capitalization of their user name.
Valid values include:
- true - Enables case sensitivity for all username input. When this option is set to
true, users must sign in using the exact capitalization of their given username, such as “UserName”. This is the default value. - false - Enables case insensitivity for all username input. For example, when this option is set to
false, users can sign in usingusername,USERNAME, orUserName. This option also enables bothpreferred_usernameandemailalias to be case insensitive, in addition to theusernameattribute.
2267 2268 2269 |
# File 'cognito/cfn_user_pool.rb', line 2267 def case_sensitive @case_sensitive end |
Class Method Details
.jsii_properties ⇒ Object
2269 2270 2271 2272 2273 |
# File 'cognito/cfn_user_pool.rb', line 2269 def self.jsii_properties { :case_sensitive => "caseSensitive", } end |
Instance Method Details
#to_jsii ⇒ Object
2275 2276 2277 2278 2279 2280 2281 |
# File 'cognito/cfn_user_pool.rb', line 2275 def to_jsii result = {} result.merge!({ "caseSensitive" => @case_sensitive, }) result.compact end |