Re: JIT Login (WPO) and DirectAction component
Re: JIT Login (WPO) and DirectAction component
- Subject: Re: JIT Login (WPO) and DirectAction component
- From: Chuck Hill <email@hidden>
- Date: Tue, 5 Apr 2005 09:19:54 -0700
On Apr 5, 2005, at 1:20 AM, Erwin wrote:
A little bit different from what I read in WPO, I implemented my
JITLoginPage as a stateless page
I check the login and the password in this page (row fetched) ,
then I refetch the user object from the Session defaultEditingContext,
AbstractUser authenticatedUser = (AbstractUser)
EOUtilities.objectMatchingKeyAndValue(session().defaultEditingContext()
, "AbstractUser", "login", userLogin);
then I create the session
session().takeValueForKey(authenticatedUser, "authenticatedUser");
It's there (I can print it)....
Try printing the session ID too.
My destinationUrl is right (as stated in WPO), and after the
identification process the transfer is done to the destination page
(ArchivePage, also stateless component) where I put :
How do you do the transfer? It sounds like you are doing a redirect
and the session ID is missing from the URL/cookie.
public void appendToResponse(WOResponse response, WOContext
context){
Try printing the session ID here too, I'll bet it is different.
Chuck
if ( ! ((Session)session()).isUserAuthenticated()){
WORedirect loginPageRedirect = (WORedirect)
pageWithName("WORedirect");
loginPageRedirect.setUrl(DirectAction.secureLoginUrl(context));
loginPageRedirect.appendToResponse(response, context);
} else {
super.appendToResponse(response, context);
}
}
Unfortunatly : ((Session)session()).isUserAuthenticated() always
returns FALSE...
Even if I try to check it with :
session().valueForKey("authenticatedUser")
I always got a null value, so there is again a redirect to the
JITLoginPage ...
my session component is the 'standard' WPO session (used in chap 4)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
village.net
This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden