Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

WSO2 products can be configured to authenticate users using their attributes such as email or mobile number instead of the username. This topic provides instructions on how to set up your WSO2 product to authenticate a users by using their email.

...

ParameterDescription
UserNameAttribute

For this you need to set mail attribute of the user.

Code Block
languagehtml/xml
<Property name="UserNameAttribute">mail</Property>
UserNameSearchFilter

For this you need to use the mail attribute of the user instead of cn or uid.

Code Block
languagehtml/xml
<Property name="UserNameSearchFilter">(&amp;(objectClass=identityPerson)(mail=?))</Property>
UserNameListFilter

For this you need to use the mail attribute of the user.

Code Block
languagehtml/xml
<Property name="UserNameListFilter">(&amp;(objectClass=identityPerson)(mail=*))</Property>
UserDNPattern

This parameter is used to speedup the LDAP search operations. You can comment out this config.

Code Block
languagehtml/xml
<!--Property name="UserDNPattern">cn={0},ou=Users,dc=wso2,dc=com</Property-->
UsernameJavaRegEx

This property enables you to add special characters like "@" in the user name.

Code Block
languagexml
<Property name="UsernameJavaRegEx">[a-zA-Z0-9@._-|//]{3,30}$</Property>
Realm configurations

The AdminUser username should use the email attribute of the admin user.

Code Block
languagehtml/xml
<AdminUser>
         <UserName>admin@wso2.com</UserName>
         <Password>admin</Password>
</AdminUser>