You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alex Romayev <ro...@yahoo.com> on 2002/11/05 17:43:49 UTC
Re: cocoon-users Digest 4 Nov 2002 20:21:42 -0000 Issue 1677
> ATTACHMENT part 16 message/rfc822
> Date: Mon, 04 Nov 2002 12:50:02 -0500
> From: Markdelanoy@aol.com
> To: cocoon-users@xml.apache.org
> Subject: Re: Authentication: redirect
>
> I did a hack because as you say currently the
> examples only work for a particular
> "url"/file/resource.
>
> I actually pass the resource given to me and store
> it within the login page as a hidden field. When
> the user submits username, password/etc this will
> come along too.
>
> Then if authenticated i redirect to that "resource"
> using "request:resource". This retrieves the
> resource parameter from the http request parameters
> object and off you go.
>
> My redirect looks like this, e.g.
> <map:redirect-to
> url="cocoon:/?action={request:resource}">
I assume you mean request-param:resource...
>
> This then will work for any page in the site that
> you want protected.
>
> Note that I don't point to url's rather I have a
> single URL (the cocoon servlet and my app).
> cocoon:/ helps to establish that. I use action id's
> much like struts (I guess but the concept has been
> around much longer than struts.) pointing into
> metadata to help distinguish what page to show.
>
> But whether you use action id parameters or file
> url's this work.
Actually I don't use an action id, but rather do my
pattern matching in the sitemap. It appears that
{request-param:resource} is giving my full url
starting with /cocoon/... and hence, I cannot use
cocoon:/. Is there any other way to call the resouce
in the sitemap?
Thanks,
-Alex
>
> later, md
>
> Date: Mon, 4 Nov 2002 09:32:18 -0800 (PST)
> From: Alex Romayev <ro...@yahoo.com>
> Subject: Re: Authentication: redirect
> To: cocoon-users@xml.apache.org
>
> I'm afraid this e-mail got missed over the weekend.
>
>
> Carsten or anyone else familiar with 2.1
> authentication would you be able to help?
>
> Thanks,
> -Alex
>
> --- Alex Romayev <ro...@yahoo.com> wrote:
> > Hello,
> >
> > I can't seem to figure out how to redirect back to
> a
> > protected resource after the authentication. The
> > sample only has one resource called "protected".
> >
> > For example, I would like to protect anything that
> > is
> > under cocoon/admin/*. Let's say someone requests
> > cocoon/admin/add-user resource. I've noticed that
> > when the framework redirects to the login resource
> > it
> > adds the following to the url:
> >
> > resource=%2Fcocoon%2Fadmin%2Fadd-user.
> >
> > Is there a way to retrieve this in the sitemap,
> > i.e.,
> > something like:
> >
> > <map:redirect-to uri="{request-param:resource}?
> >
> > Thanks,
> > -Alex
> >
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>