You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2014/07/24 08:48:38 UTC

[jira] [Comment Edited] (OAK-1984) Repository.login(creds).getUserId() should return the 'real' user's id.

    [ https://issues.apache.org/jira/browse/OAK-1984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14072895#comment-14072895 ] 

angela edited comment on OAK-1984 at 7/24/14 6:47 AM:
------------------------------------------------------

note that changing this, is very likely to cause regressions as the behavior in JR 2.x was the way it currently is in Oak.

furthermore the JavaDoc of Session.getUserID states:

{quote}
Gets the user ID that was used to acquire this session. This method is free to return an "anonymous user id" or null if the Credentials used to acquire this session happens not to have provided a real user ID (for example, if instead of SimpleCredentials some other implementation of Credentials was used). 
{quote}

So, IMHO the change would also violate the API contract.
Therefore, i am a bit reluctant making this move...

[~tripod], maybe you provide some further information on why you would like to see this changed?


was (Author: anchela):
note that changing this, is very likely to cause regressions as the behavior in JR 2.x was the way it currently is in Oak.

furthermore the JavaDoc of Session.getUserID states:

{quote}
Gets the user ID that was used to acquire this session. This method is free to return an "anonymous user id" or null if the Credentials used to acquire this session happens not to have provided a real user ID (for example, if instead of SimpleCredentials some other implementation of Credentials was used). 
{quote}

So, IMHO the change would also violate the API contract.

> Repository.login(creds).getUserId() should return the 'real' user's id.
> -----------------------------------------------------------------------
>
>                 Key: OAK-1984
>                 URL: https://issues.apache.org/jira/browse/OAK-1984
>             Project: Jackrabbit Oak
>          Issue Type: Wish
>            Reporter: Tobias Bocanegra
>
> Session.getUserId() uses ContentSession.getAuthInfo().getUserId() which returns the user id passed in the simple credentials during login.
> since the user-lookup is case insensitive, the Session.getUserId() might not be equal to authorizable.getId().
> * Session.getUserID() should always return the user.getId()
> * add new method: AuthInfo.getLoginId() to internally remember the id used during login.



--
This message was sent by Atlassian JIRA
(v6.2#6252)