-
1. Re: signout no longer works
jksmartt Jan 27, 2006 4:56 PM (in response to jksmartt)I have found what the problem is. The code above actually works. You can signout as long as you don't redirect after. So you can't say have someone signout and redirect them to the login screen. Like this:
public void processAction(JBossActionRequest request, JBossActionResponse response) throws PortletException, IOException { response.signOut(); response.sendRedirect("/portal/auth/"); }
This will not work.
But this will (Don't redirect):public void processAction(JBossActionRequest request, JBossActionResponse response) throws PortletException, IOException { response.signOut(); }
Would be nice if we could redirect -
2. Re: signout no longer works
julien1 Jan 27, 2006 6:57 PM (in response to jksmartt)sendRedirect cancels the signout, maybe it should throw an IllegalStateException rather.
signOut() stay on the same page but with a non auth URL.
I am wondering if doing a signOut(url) would make sense. -
3. Re: signout no longer works
jksmartt Jan 30, 2006 12:27 PM (in response to jksmartt)That would be very nice to be able to pass in the url if someone wanted.
-
4. Re: signout no longer works
scottdawson Feb 10, 2006 10:58 PM (in response to jksmartt)We needed something like the signOut(url) suggested by Julien, so I've added a signOut(String destinationPage) method in JBossActionResponse. The parameter is a page reference (like "default.Test"), not a URL.
I've added a destination parameter in the JSP (menu.jsp) to get things started:<portlet:actionURL windowState="normal"> <portlet:param name="op" value="userLogout"/> <portlet:param name="destinationPage" value="default.Test"/> </portlet:actionURL>">
Modifications have also been made to UserPortlet (to retrieve the parameter set by the JSP), and in the SignOutResult and InvokeWindowActionCommand classes. The old way still works -- signOut with no parameter will try to stay on the current page as Julien explained.
If this seems reasonable, I can create a new entry (patch?) in the JIRA and attach the modified files.
Regards,
Scott Dawson
Unisys -
5. Re: signout no longer works
julien1 Feb 11, 2006 7:59 AM (in response to jksmartt)have you signed the contributor agreement ?
-
6. Re: signout no longer works
scottdawson Feb 13, 2006 11:19 AM (in response to jksmartt)Julien,
I signed it this morning. Let me know what the next step is.
Thanks,
Scott -
7. Re: signout no longer works
julien1 Feb 13, 2006 12:23 PM (in response to jksmartt)you should submit a patch in jira and attach your changes for this as it is just a minor change.
-
8. Re: signout no longer works
scottdawson Feb 13, 2006 3:09 PM (in response to jksmartt)Do you prefer diff files, or the .java files or something else?
-
9. Re: signout no longer works
julien1 Feb 14, 2006 5:19 AM (in response to jksmartt)both :-) are usefull
-
10. Re: signout no longer works
scottdawson Feb 14, 2006 10:27 AM (in response to jksmartt)Here is the patch:
http://jira.jboss.com/jira/browse/JBPORTAL-621
Regards,
Scott Dawson
Unisys -
11. Re: signout no longer works
julien1 Feb 14, 2006 7:58 PM (in response to jksmartt)Scott,
I have an issue with the current patch which is too specific because it takes care of pages.
Do you mind if rather the signout operation takes a generic URL that the portal will send redirect to instead ?
Page still can be resolved using the org.jboss.portlet navigation API by finding the right page (to be sure it exists) and then create a URL to this page that is placed in the sign out.
I know it makes extra work when implemening the portlet signout but that makes us sure that the page exist and the signout is not tied to the notion of page. -
12. Re: signout no longer works
scottdawson Feb 15, 2006 10:51 AM (in response to jksmartt)Julien,
I think the change you suggested is an improvement. So, there will be modifications in the execute method of InvokeWindowActionCommand and the code there for SignOutResult may become similar to the code for HTTPRedirectionResult. Do you agree?
Do you think the rest of the flow should be re-architected or are the required changes (to the patch) mostly in InvokeWindowActionCommand.execute?
Would you like for me to make the changes and re-submit the patch?
Thanks,
Scott -
13. Re: signout no longer works
scottdawson Mar 30, 2006 5:40 PM (in response to jksmartt)I've updated the JIRA with a new patch based on Julien's recommendations:
http://jira.jboss.com/jira/browse/JBPORTAL-621
Regards,
Scott Dawson
Unisys