I don't think it is correct to manipulate the username where ever we are
storing it. Therefore I think we need to remove the toLowerCase() in this
case and fix it.

IMO manipulating the cases of user names can lead to many inconsisties.
Consider the case where we might allow two users to have the same username
in different cases (nuwan, Nuwan). This will cause issues in those cases.

Can we fix this easily? Without breaking the other stuff :)

Thanks,
NuwanD.


On Thu, Oct 10, 2013 at 5:52 PM, Sanjeewa Malalgoda <[email protected]>wrote:

>
>
>
> On Thu, Oct 10, 2013 at 5:33 PM, Dinusha Senanayaka <[email protected]>wrote:
>
>> Hi,
>>
>> In APIM, we store the userName of subscribers as they given in the
>> signUp.. But in identity.oauth, when storing a new access token, it stores
>> the userName by converting to lower case.. check the code segment [1].  We
>> are facing some issues due to this inconsistency.. Is there any specific
>> reason to do it like that ? What should be the correct way of storing the
>> userName (Shouldn't it be consistence across the platform )?
>>
> In general usernames are not case sensitive. So we should store them in
> single format or ignore case when we do comparison. How if we store
> username in lower case when we do self sign in?
>
> Thanks
> sanjeewa.
>
>>
>> [1]
>> org.wso2.carbon.identity.oauth2.dao.TokenMgtDAO.java -->
>> storeAccessToken()
>>
>> *prepStmt.setString(4, accessTokenDO.getAuthzUser().toLowerCase());  *
>>
>> Regards,
>> Dinusha.
>>
>> --
>> Dinusha Dilrukshi
>> Senior Software Engineer
>> WSO2 Inc.: http://wso2.com/
>> Mobile: +94725255071
>> Blog: http://dinushasblog.blogspot.com/
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *
> *
> *Sanjeewa Malalgoda*
> Senior Software Engineer
> WSO2 Inc.
> Mobile : +94713068779
>
>  <http://sanjeewamalalgoda.blogspot.com/>blog
> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/>
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Nuwan Dias

Senior Software Engineer - WSO2, Inc. http://wso2.com
email : [email protected]
Phone : +94 777 775 729
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to