You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Fe...@thomson.com on 2006/03/22 12:23:13 UTC
Bug in authentication-fw sample
If one logs in, then presses the back button and logs in again one gets
the following error, instead
of being redirected inside:
org.apache.cocoon.ProcessingException: User is already authenticated
using handler: demohandler
<map:mount> - context://samples/blocks/sitemap.xmap - 66:68
How does one avoid this?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Bug in authentication-fw sample
Posted by Brian Hawkins <br...@lingotek.com>.
I noticed this as well. I fixed it by doing the following:
<map:match pattern="login">
<map:act type="auth-logout">
<map:parameter name="handler" value="PortalHandler"/>
</map:act>
<map:act type="auth-login">
<map:parameter name="handler" value="PortalHandler"/>
<map:parameter name="parameter_userid"
value="{request-param:userid}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
<map:redirect-to uri="portal/LingoPoint"/>
</map:act>
<map:read mime_type="html/text" src="login.html"/>
</map:match>
Basically do a logout first and then do the login stuff. Works really well.
Brian
Fernando.Matomira@thomson.com wrote:
> If one logs in, then presses the back button and logs in again one gets
> the following error, instead
> of being redirected inside:
>
> org.apache.cocoon.ProcessingException: User is already authenticated
> using handler: demohandler
> <map:mount> - context://samples/blocks/sitemap.xmap - 66:68
>
>
> How does one avoid this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
RE: Bug in authentication-fw sample
Posted by Kai Mutz <km...@web.de>.
You can avoid this by using the LoggedInAction, e.g.
<map:match pattern="do-login">
<map:act type="auth-loggedIn">
<map:parameter name="handler" value="HandlerName"/>
<map:redirect-to uri="loggedInPage"/>
</map:act>
<map:act type="auth-login">
<map:parameter name="handler" value="HandlerName"/>
<map:parameter name="parameter_login"
value="{request-param:loginfield}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
....
</map:act>
<map:redirect-to uri="cocoon:/login-error"/>
</map:match>
> -----Original Message-----
> From: users-return-86022-kmuetz=web.de@cocoon.apache.org
> [mailto:users-return-86022-kmuetz=web.de@cocoon.apache.org]On Behalf Of
> Fernando.Matomira@thomson.com
> Sent: Wednesday, March 22, 2006 12:23 PM
> To: users@cocoon.apache.org
> Subject: Bug in authentication-fw sample
>
>
> If one logs in, then presses the back button and logs in again one gets
> the following error, instead
> of being redirected inside:
>
> org.apache.cocoon.ProcessingException: User is already authenticated
> using handler: demohandler
> <map:mount> - context://samples/blocks/sitemap.xmap - 66:68
>
>
> How does one avoid this?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org