[Catalyst] HOWTO: extend the Authentication tutorial example and redirect to original URI

apv apv at sedition.com
Thu Mar 29 18:54:59 GMT 2007


On Thursday, Mar 29, 2007, at 08:28 US/Pacific, Chisel Wright wrote:
> On Thu, Mar 29, 2007 at 09:13:31AM -0700, Jeff Chimene wrote:
>> As a side question, why does this particular technique use redirect()?
>> As opposed to, e.g. detach()?
>
> Because Parley has kinda evolved over [a long period of] time, and I
> expect there wasn't a detach() method when I wrote that method. :)
>
For the first redirect (to the /user/login page) I think a detach is 
nice
because the URI stays the same as where you want to go. For the second,
back to {after_login}, a redirect is probably how you should do it.
You're logging in so you're doing a POST request and you want to
redirect after that and have the right URL so the user isn't on
the page that corresponds to /admin/user/edit or something while the
URI is still /user/login.

-Ashley




More information about the Catalyst mailing list