Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B567310C7E for ; Tue, 30 Jul 2013 10:27:51 +0000 (UTC) Received: (qmail 58493 invoked by uid 500); 30 Jul 2013 10:27:50 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 58329 invoked by uid 500); 30 Jul 2013 10:27:49 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 58175 invoked by uid 99); 30 Jul 2013 10:27:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jul 2013 10:27:48 +0000 Date: Tue, 30 Jul 2013 10:27:48 +0000 (UTC) From: "Jukka Zitting (JIRA)" To: dev@jackrabbit.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (JCR-3634) New method: JackrabbitRepository.login(Credentials, Map) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3634?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D137236= 79#comment-13723679 ]=20 Jukka Zitting commented on JCR-3634: ------------------------------------ > Which attribute would take precedence in your case when there is a confli= ct between the ones one the Credential instance and the explicitly passed o= nes? Good point. We can make that explicit with something like: "Attributes incl= uded in or implied by the credentials instance override those in the attrib= utes map." Such precedence is not ideal (I'd prefer it to be the other way = around), but probably necessary for backwards compatibility with the mentio= ned naive default implementation and avoids confusion with cases like token= authentication where credential attributes are included in the authenticat= ion process. > For the next version of the standard, maybe we should consider adding thi= s method? Yes. Defining and using it first in JackrabbitRepository makes a strong rat= ionale for including it in the JCR spec. =20 > New method: JackrabbitRepository.login(Credentials, Map) > ------------------------------------------------------------------------ > > Key: JCR-3634 > URL: https://issues.apache.org/jira/browse/JCR-3634 > Project: Jackrabbit Content Repository > Issue Type: New Feature > Components: jackrabbit-api > Affects Versions: 2.7.1 > Reporter: Michael D=C3=BCrig > > As discussed [1] we need a way for passing session attributes on login wi= thout having to fall back to credentials. The latter might not support cred= entials or not be present at all when authentication is handled externally. > I suggest to add the following method to JackrabbitRepository: > /** > * Equivalent to login(credentials, workspace) where > *
    > *
  • workspace =3D attributes.get(ATT_WORKSPACE_NAME),=
  • > *
  • credentials carry all and only the attributes pas= sed > * through the attributes map.
  • > *
> * > * @param credentials the credentials of the user > * @param attributes the attributes to put into the session > * @return a valid session for the user to access the repository. > * @throws javax.jcr.LoginException if authentication or authorization f= or the > * specified workspace fails. > * @throws javax.jcr.NoSuchWorkspaceException if the specified workspace= is not recognized. > * @throws javax.jcr.RepositoryException if another error occurs. > */ > Session login(Credentials credentials, Map attributes); > See also OAK-803 for some more background. > [1] http://markmail.org/message/lwhpglehee3jgpip -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira