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

2007-03-29 Thread Jeff Chimene
Hi, I was wondering if anyone has extended the Authentication tutorial example to handle the redirect to original URI concept requested in this thread: http://www.gossamer-threads.com/lists/catalyst/users/11676 Does that suggested answer work with the implementation in

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

2007-03-29 Thread Chisel Wright
On Thu, Mar 29, 2007 at 02:27:14AM -0700, Jeff Chimene wrote: Hi, I was wondering if anyone has extended the Authentication tutorial example to handle the redirect to original URI concept requested in this thread: http://www.gossamer-threads.com/lists/catalyst/users/11676 Does that

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

2007-03-29 Thread Jeff Chimene
Chisel Wright wrote: On Thu, Mar 29, 2007 at 02:27:14AM -0700, Jeff Chimene wrote: Hi, I was wondering if anyone has extended the Authentication tutorial example to handle the redirect to original URI concept requested in this thread:

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

2007-03-29 Thread Chisel Wright
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.

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

2007-03-29 Thread Jeff Chimene
Chisel Wright wrote: if( not $c-is_logged_in($c) ) { I had to change to if( not $c-user_exists() ) { it looks like is_logged_in() is a routine you wrote? otherwise, it does what I need. Thanks! cheers, jec ___ List:

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

2007-03-29 Thread Jay K
Another thing to keep in mind here is that if you are not very particular with your cache-control headers - Many browsers will cache your page. So if you are accessing /articles/1723, and it detaches to the login procedure, when the user hits /articles/1723 again - it will often bring up the

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

2007-03-29 Thread Jeff Chimene
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

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

2007-03-29 Thread Chisel Wright
On Thu, Mar 29, 2007 at 09:40:56AM -0700, Jeff Chimene wrote: it looks like is_logged_in() is a routine you wrote? Whoops, yes, nothing special, just a convenience: sub is_logged_in { my ($c) = @_; if ($c-user) { return 1; } return 0; } I think I did that to leave

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

2007-03-29 Thread apv
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]

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

2007-03-29 Thread Dave Rolsky
On Thu, 29 Mar 2007, Jay K wrote: Another thing to keep in mind here is that if you are not very particular with your cache-control headers - Many browsers will cache your page. So if you are accessing /articles/1723, and it detaches to the login procedure, when the user hits /articles/1723

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

2007-03-29 Thread Bill Moseley
On Thu, Mar 29, 2007 at 11:44:35AM -0500, Jay K wrote: Another thing to keep in mind here is that if you are not very particular with your cache-control headers - Many browsers will cache your page. So if you are accessing /articles/1723, and it detaches to the login procedure, when the user

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

2007-03-29 Thread Dave Rolsky
On Thu, 29 Mar 2007, Bill Moseley wrote: This always makes me wish for a 4xx code that could be returned to the client but not force the browser to ask for authentication. After all, the user is not currently authorized to view the page. And the idea being that the browser would not cache the