jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chetan Mehrotra <chetan.mehro...@gmail.com>
Subject Re: Login parameters
Date Mon, 29 Jul 2013 09:36:58 GMT
> 1. Use the attribute feature of SimpleCredentials to pass such parameters

+1 to this approach. It is currently also used in Sling to map the
authInfo map in ResourceResolverFactory [1]. The data passed is made
accessible later via Session.getAttribute [2].

To reduce hard dependency on SimpleCredentials the
setAttribute/getAttribute pair can be part of some interface which is
part of Oak JCR API. Internally the login method checks if its
SimpleCredentails or some credential which also implement the new
interface and handle it accordingly.

Chetan Mehrotra

[1] http://sling.apache.org/apidocs/sling6/org/apache/sling/api/resource/ResourceResolverFactory.html#getResourceResolver(java.util.Map)
[2] http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Session.html#getAttribute(java.lang.String)

Mime
View raw message