<br><br><div class="gmail_quote">On Wed, Sep 30, 2009 at 7:30 AM, Derek Wueppelmann <span dir="ltr">&lt;<a href="mailto:dwueppel@gmail.com">dwueppel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;m actually doing forwards to my login page right now. So that when a<br>
user logs in they can still see the page they were originally trying to<br>
view. I capture the URL they were attempting to view in the login<br>
process.<br></blockquote><div><br>And then redirect back to that original page after login? <br></div><div><br>I pass that data via the cache or session. <br></div><div><br>$c-&gt;cache-&gt;set( $key, { <br>    orig_url =&gt; $url,<br>
    message =&gt; &#39;Auhorization is required&#39;,<br> });<br><br>$c-&gt;res-&gt;redirect( $c-&gt;uri_for( &#39;/login&#39;, { info =&gt; $key } ) );<br><br><br>Catalyst docs show an example using auto.  BTW - shouldn&#39;t the redirect be an absolute-URI?<br>
<br>           sub auto : Private {<br>               my ( $self, $c ) = @_;<br>               if ( !$c-&gt;user_exists ) { # Catalyst::Plugin::Authentication<br>                   $c-&gt;res-&gt;redirect( &#39;/login&#39; ); # require login<br>
                   return 0; # abort request and go immediately to end()<br>               }<br>               return 1; # success; carry on to next action<br>           }<br><br>RFC3986 has:<br>absolute-URI = scheme &quot;:&quot; hier-part [ &quot;?&quot; query ]<br>
<br>And 2616:<br>       Location       = &quot;Location&quot; &quot;:&quot; absoluteURI<br><br><br></div></div>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org">moseley@hank.org</a><br>