Views
Replies
Total Likes
Looks like a bug - file a day care ticket.
Views
Replies
Total Likes
Views
Replies
Total Likes
OOB login, creates 'login-token' which is a session cookie. Are you seeing this cookie getting created ?
Views
Replies
Total Likes
Have you read this OAK doc:
https://jackrabbit.apache.org/oak/docs/security/authentication/tokenmanagement.html
Views
Replies
Total Likes
Yes, I have read it, but I got nothing in clear there.
Let me explain, I have implemented the following classes:
- MyAuthHandler
extends DefaultAuthenticationFeedbackHandler
implements AuthenticationHandler, AuthenticationFeedbackHandler
- MyAuthLoginModuleFactory implements LoginModuleFactory
- MyAuthLoginModule extends AbstractLoginModule
- MyAuthJsonIDP implements ExternalIdentityProvider
I have the right configuration linking every one of these pieces. I'm able to login, logout, etc. But, looks like AEM 6.1 require some special implementation related with token.
There are many rows in my jaas configuration, including the two mentioned in that articles
http://screencast.com/t/xDgNBx1wF0A
I can't neither understand the real scope of this paragraph:
----
The creation of a new token is triggered by valid SimpleCredentials passed to the login module chain that contain an additional, empty .token attribute. The default TokenProvider implementation will consequently generate a new token and store it’s hash along with all mandatory and informative attributes to the new content node representing the new token.
------
I've tried to add an empty attribute ".token" to the AuthenticationInfo before exit of extractCredentials in MyAuthHandler but with no success.
AuthenticationInfo info = new AuthenticationInfo(AUTH_TYPE, user, psw.toCharArray());
info.put(ACCESS_TOKEN_KEY, accessToken);
info.put(USER_KEY, user);
info.put(".token", "");
So, as you can see there should be a key piece of this puzzle that I'm not capable yet to figure out where to put.
Many libraries, APIs, different versions of these one, many incompatibilities, many AEM versions, etc, and to few real samples or articles about how to use them together have become in a big problem for me. Hopefully I'm very close to the end, but it looks like a maze.
.
Views
Replies
Total Likes
This issue come to remember me why I hate too much every existing CMS. When you have to do something just a little bit different of its common tasks then you get inside a maze.
- Somebody can give the email of some developer in Adobe in charge of the Oak module? Looks like nobody in this forum is capable of really clarify my doubts?
I have a client waiting for this feature since 2 weeks!!.
I can't see any Factory for the Oak Token Login Module like the existing for the classic Oak Login Module.
- Is there any article about how to create the .token node after the user is logged in?.
- What is the right place to do that: a Login Module, or before in the AuthenticationHandler?
Thanks in advance.
Views
Replies
Total Likes
Couple of questions.
which version of AEM and Oak are you using ?
are you seeing login-token cookie getting created once you login with your customLoginModule ?
Views
Replies
Total Likes
I'm using AEM 6.1, SP1.
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>oak-auth-external</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.jcr.jackrabbit.server</artifactId>
<version>2.3.0</version>
</dependency>
My AuthLoginModule class extends org.apache.jackrabbit.oak.spi.security.authentication.AbstractLoginModule
When I log in from CRXDELite with my external user I can see the login-token cookie created in the browser. When I use my app, I'm creating my own cookie.
My questions are:
- The name "login-token" is mandatory for the cookie?
- Who is responsable for create this cookie: the AuthenticationHandler.authenticationSucceeded event handler, or the External Login Module? It looks to me like should be the first one.
- What info should be stored in this cookie to allow AEM read it and use it as its own?
- Do I need to create an entry in the node .tokens below the /home/users/myCurrentUser? What info do I need to store there?
Thanks
Views
Replies
Total Likes
It looks like, we need that login-token which is created by AuthenticationHandler. Let me debug further and let you know If I could figure out something
Views
Replies
Total Likes
Yes, I agree with you. The problem is that I was not able to locate some example about how to create this ".token" nor the sources of the AuthHandler by default. I appreciate so much your efforts to help me, thanks.
In the CRXDE Lite's HomePage I can see this information:
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies