You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Derek Hohls <DH...@csir.co.za> on 2004/07/19 11:38:50 UTC
Authentication - dynamic redirect after login ?
I am trying to redirect users, that click on a
protected page, back to that page after login:
in the call to the login page, I have:
login?resource=redirectpageuri
(where redirectpageuri is the URI of the
protected page)
The login page form has the necessary:
<input type="hidden" name="resource" value="{$resource}"/>
And the sitemap looks like:
<map:match pattern="do-login">
<!-- try to login -->
<map:act type="auth-login">
<map:parameter name="handler" value="demohandler"/>
<map:parameter name="parameter_name"
value="{request-param:username}"/>
<map:parameter name="parameter_password"
value="{request-param:password}"/>
<!-- keep info in session -->
<map:act type="session-propagator">
<map:parameter name="myID" value="{ID}"/>
<map:parameter name="myTag" value="{tag}"/>
</map:act>
<map:redirect-to uri="{request-param:resource}"/> <!--DOES NOT
WORK? -->
</map:act>
<map:redirect-to uri="login"/>
</map:match>
Regardless from where in the site the login page
is called, all that happens is the "home" page of
app is displayed ?
Any ideas what else to change here??
Thanks
Derek
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Authentication - dynamic redirect after login ?
Posted by Stephanie Zohner <st...@gmx.at>.
Might be a stupid question, but did you varify that the request-param
"resource" is really set when calling the login pipeline?
Did you try without the session propagator?
> I am trying to redirect users, that click on a
> protected page, back to that page after login:
>
> in the call to the login page, I have:
>
> login?resource=redirectpageuri
>
> (where redirectpageuri is the URI of the
> protected page)
>
> The login page form has the necessary:
>
> <input type="hidden" name="resource" value="{$resource}"/>
>
> And the sitemap looks like:
>
> <map:match pattern="do-login">
> <!-- try to login -->
> <map:act type="auth-login">
> <map:parameter name="handler" value="demohandler"/>
> <map:parameter name="parameter_name"
> value="{request-param:username}"/>
> <map:parameter name="parameter_password"
> value="{request-param:password}"/>
> <!-- keep info in session -->
> <map:act type="session-propagator">
> <map:parameter name="myID" value="{ID}"/>
> <map:parameter name="myTag" value="{tag}"/>
> </map:act>
> <map:redirect-to uri="{request-param:resource}"/> <!--DOES NOT
> WORK? -->
> </map:act>
> <map:redirect-to uri="login"/>
> </map:match>
>
> Regardless from where in the site the login page
> is called, all that happens is the "home" page of
> app is displayed ?
>
> Any ideas what else to change here??
>
> Thanks
> Derek
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
>
>
> ---------------------------------------------------------------------
> 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