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/preauthentication.html [2] http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-pojosr/src/test/groovy/org/apache/jackrabbit/oak/run/osgi/TokenAuthenticationTest.groovy?view=markup