Configure Email Address as the Username
Configure Email Address as the Username¶
Configuring the email address as the username in an already running Identity Server is not the production recommended way. Therefore, make sure to configure it before you begin working with WSO2 IS.
Log in to the Management Console and click Claims > List > http://wso2.org/claims.
Click the Edit link corresponding to the Username claim and configure the
Mapped Attributeproperty to
Click Update to save the changes.
Add the following configuration to enable email authentication.
[tenant_mgt] enable_email_domain= true
Configure the following set of parameters in the userstore configuration, depending on the type of userstore you are connected to (LDAP/Active Directory/ JDBC).
Set the mail attribute of the user. LDAP/Active Directory only
Use the mail attribute of the user instead of
uid. LDAP/Active Directory only
Use the mail attribute of the user if necessary. LDAP/Active Directory only
Change this property that is under the relevant userstore manager tag as follows. This property allows you to add special characters like "@" in the username.
This is a regular expression to validate usernames. By default, strings have a length of 5 to 30. Only non-empty characters are allowed. You can provide ranges of alphabets, numbers and also ranges of ASCII values in the RegEx properties.
The username must use the email attribute of the admin user.
Before this configuration, the user having the username admin and password admin was considered the super administrator. The super administrator user cannot be deleted.
After this configuration, the user having the username
[email protected]is considered the super administrator. The user having the username admin is considered as a normal administrator.
- With these configuration users can log in to super tenant with both
email username (
[email protected]) or non-email usernames (
larry). However, for tenants, only email usernames are allowed. (
- You can configure email username without enabling the
enable_email_domainproperty (step 5). Then users can log in to both the super tenant and the tenant using email and non-email usernames. However, super tenant users should always use @carbon.super at the end of usernames.
- With these configuration users can log in to super tenant with both email username (
Restart the server.