Using Email Address as the Username

This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Using Email Address as the Username

Note!

Configuring the email address as the username in an already running Identity Server is not the production recommended way. Therefore, make sure to change configure it before you begin working with WSO2 IS.

  1. Open the <PRODUCT_HOME>/repository/conf/carbon.xml file.

  2. Look for the commented out configuration EnableEmailUserName. Uncomment the configuration to enable email authentication.

    <EnableEmailUserName>true</EnableEmailUserName>
  3. Open the <IS_HOME>/repository/conf/claim-config.xml file and configure the AttributeID property of the http://wso2.org/claims/username claim ID that is under <Dialect dialectURI="http://wso2.org/claims"> to mail.

    <Claim> <ClaimURI>http://wso2.org/claims/username</ClaimURI> <DisplayName>Username</DisplayName> <AttributeID>mail</AttributeID> <Description>Username</Description> </Claim>
  4. Open the <IS_HOME>/repository/conf/identity/identity-mgt.properties file and set the following property to true

    UserInfoRecovery.UseHashedUserNames=true

    Optionally, you can also configure the following property to determine which hash algorithm to use.

    UserInfoRecovery.UsernameHashAlg=SHA-1
  5. Configure the following set of parameters in the user store configuration, depending on the type of user store you are connected to (LDAP/Active Directory/ JDBC).

  6. Restart the server.

Related Topics

For more information on how to configure primary and secondary user stores, see Configuring User Stores.