hi chetan

sound reasonable to me.

kind regards
angela

On 05/06/14 13:51, "Chetan Mehrotra" <chetan.mehro...@gmail.com> wrote:

>Hi,
>
>I am trying to use PreAuthentication [2] with Token Creation support
>in Oak. For that I have following LoginModules configured in order
>below
>
>1. TokenLoginModule
>2. PreAuthLoginModule
>3. LoginModuleImpl
>
>I managed to get preauth along with token creation work by changing
>the PreAuthLoginModule  from [1] with following modifications
>
>1. Set the ".token" to empty in the SimpleCredentials passed in shared
>credentials.
>    This would enable the TokenLoginModule to create a token in commit
>phase
>2. Copy the token value from shared credential back to the custom
>credential attribute
>
>And then access the token value from the passed credential attribute
>in session login call.
>
>Wanted to check if this approach is ok or it should be done in a
>different way?
>
>Chetan Mehrotra
>[1] 
>http://jackrabbit.apache.org/oak/docs/security/authentication/preauthentic
>ation.html
>[2] 
>http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-pojosr/src/test/groo
>vy/org/apache/jackrabbit/oak/run/osgi/TokenAuthenticationTest.groovy?view=
>markup

Reply via email to