Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WSO2 identity server email as username

We are currently evaluating the WSO2 Identity server. We want to use email address as an username. By default the username is 30 characters, it is not long enough. And it must support both . and @ in the username. Is there an way to configure this? The user store is a JDBC(Mysql) one.

Thanks

like image 614
yannb Avatar asked Mar 03 '14 21:03

yannb


1 Answers

Yes.. you can do it..

Step1. Open carbon.xml in IS_HOME/repository/conf and uncomment

<EnableEmailUserName>true</EnableEmailUserName>

Step2. Open user-mgt.xml in IS_HOME/repository/conf and uncomment JDBC configurations

org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager

And

Comment default LDAP user store manager configurations.

org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager

Step3. Please add following property under the org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager configurations.

<Property name="UsernameWithEmailJavaScriptRegEx">[a-zA-Z0-9@._-|//]{3,30}$</Property>

Using above property, you can change the pattern of your email address... By default it must be more than 3 characters and less then 30, But you can configure it as you wish..

Step4. Restart the server

You can find more details on using email username from here. This article clearly explain all.

like image 197
Asela Avatar answered Oct 15 '22 21:10

Asela