Hi All,

Thanks everyone for the help. Sorry, I fail to mention that my JDBC user
store was a secondary user store.

I was able to get the $subject done by following [1],
1.  enabling “*EnableEmailUserName*” in carbon.xml
2.  adding  "*<Property
name="UsernameWithEmailJavaScriptRegEx">[a-zA-Z0-9@._-|//]{3,30}$</Property>*"
the user store config file of my secondary user store found at

*/repository/deployment/server/userstores@*sherene : it is better to
mention how one can achieve the $subject for a secondary user store, ie.
point to the correct file to edit :)


[1] http://xacmlinfo.org/2014/10/07/email-username-with-identity-server/

Thanks,

Farasath Ahamed
Software Engineer,
WSO2 Inc.; http://wso2.com
lean.enterprise.middleware


Email: [email protected]
Mobile: +94777603866
Blog: blog.farazath.com
Twitter: @farazath619 <https://twitter.com/farazath619>

On Mon, Apr 25, 2016 at 11:29 AM, Sherene Mahanama <[email protected]> wrote:

> Thanks Dilini and Tharindu. I indicated the JDBC specific properties and
> updated the page now.
>
> On Mon, Apr 25, 2016 at 11:04 AM, Tharindu Edirisinghe <[email protected]
> > wrote:
>
>> *UserNameSearchFilter* and *UserNameListFilter* are LDAP specific
>> properties and not needed for JDBC userstores.
>>
>> If you enable “*EnableEmailUserName*” in carbon.xml file regexp would be
>> govern by "UsernameWithEmailJavaScriptRegEx" property not the
>> “UsernameJavaRegEx”.. Therefore, you need to configure new property called
>> UsernameWithEmailJavaScriptRegEx  as following.
>>
>> <Property name="*UsernameWithEmailJavaScriptRegEx*">[a-zA-Z0-9@
>> ._-|//]{3,30}$</Property>
>>
>> On Mon, Apr 25, 2016 at 10:16 AM, Dilini Gunatilake <[email protected]>
>> wrote:
>>
>>> Hi Farasath,
>>>
>>> Those config parameters are not added in the JDBCUserStoreManager by
>>> default. But, you can follow the same doc you referred and add them
>>> manually. The required parameters are as follows.
>>>
>>> <Property name="UserNameAttribute">mail</Property>
>>> <Property
>>> name="UserNameSearchFilter">(&amp;(objectClass=identityPerson)(mail=?))</Property>
>>> <Property
>>> name="UserNameListFilter">(&amp;(objectClass=identityPerson)(mail=*))</Property>
>>> <Property
>>> name="UsernameJavaRegEx">^[_A-Za-z0-9-\+]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9]+)*(\.[A-Za-z]{2,})$</Property>
>>>
>>> Regards,
>>> Dilini
>>>
>>> On Mon, Apr 25, 2016 at 9:21 AM, Tharindu Edirisinghe <
>>> [email protected]> wrote:
>>>
>>>> Hi Farasath,
>>>>
>>>> Have you looked at [1] ? You should be able to get it to working with
>>>> the instructions in that.
>>>>
>>>> [1]
>>>> http://xacmlinfo.org/2014/10/07/email-username-with-identity-server/
>>>>
>>>> Regards,
>>>> TharinduE
>>>>
>>>> On Mon, Apr 25, 2016 at 7:05 AM, Danushka Fernando <[email protected]>
>>>> wrote:
>>>>
>>>>> Have you try adding the property to the configuration?
>>>>>
>>>>> Thanks & Regards
>>>>> Danushka Fernando
>>>>> Senior Software Engineer
>>>>> WSO2 inc. http://wso2.com/
>>>>> Mobile : +94716332729
>>>>>
>>>>> On Mon, Apr 25, 2016 at 12:02 AM, Farasath Ahamed <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> I was able to set email as the username for an LDAP-based user store
>>>>>> following [1]. Although [1] suggests it's the same for a JDBC-based user
>>>>>> store I couldn't find the same config parameters in the user-mgt.xml for 
>>>>>> an
>>>>>> external JDBC user store.
>>>>>>
>>>>>> Can someone pointout how to achieve the $subject?
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>> https://docs.wso2.com/display/IS510/Using+Email+Address+as+the+Username
>>>>>>
>>>>>>
>>>>>> Farasath Ahamed
>>>>>> Software Engineer,
>>>>>> WSO2 Inc.; http://wso2.com
>>>>>> lean.enterprise.middleware
>>>>>>
>>>>>>
>>>>>> Email: [email protected]
>>>>>> Mobile: +94777603866
>>>>>> Blog: blog.farazath.com
>>>>>> Twitter: @farazath619 <https://twitter.com/farazath619>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dev mailing list
>>>>>> [email protected]
>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Tharindu Edirisinghe
>>>> Software Engineer | WSO2 Inc
>>>> Platform Security Team
>>>> Blog : tharindue.blogspot.com
>>>> mobile : +94 775181586
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>>
>>> *Dilini GunatilakeSoftware Engineer - QA Team*
>>> Mobile : +94 (0) 771 162518
>>> [email protected]
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>>
>> Tharindu Edirisinghe
>> Software Engineer | WSO2 Inc
>> Platform Security Team
>> Blog : tharindue.blogspot.com
>> mobile : +94 775181586
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Sherene Mahanama
> Associate Technical Writer
>
> WSO2 (pvt.) Ltd.
> Colombo, Sri Lanka
> (+94) 777 <%28%2B94%29%20773131798>*994805*
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to