WSO2 identity server email as username

青春壹個敷衍的年華 提交于 2019-12-01 03:20:34

问题


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


回答1:


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.




回答2:


Here's the official doc on this: https://docs.wso2.com/display/IS500/Email+Authentication

By default '@' is interpreted as a special character to build full qualified usernames for multi-tenant environments. So you'll need to configure the server to interpret otherwise.



来源:https://stackoverflow.com/questions/22157567/wso2-identity-server-email-as-username

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!