[Catalyst] Trusting $c->req->uri after login

Dermot paikkos at gmail.com
Sun Sep 17 22:00:21 GMT 2017


I you mean trust "user", then yes. Put a `if $c->user' somewhere in your
Root Controller - perhaps an auto action - and redirect if user is undef.

`user` is populated by Catalyst::Plugin::Authentication[1]


[1]
http://search.cpan.org/~bobtfish/Catalyst-Plugin-Authentication-0.10023/lib/Catalyst/Plugin/Authentication.pm


On 17 September 2017 at 14:49, Gavin Henry <gavin.henry at gmail.com> wrote:

> Hi all,
>
> Can I trust this to use use to redirect a user after login (session
> expired etc) or should I validate it against $c->uri_for()
>
> Thanks.
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/
> catalyst at lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/catalyst/attachments/20170917/f44d80cc/attachment.htm>


More information about the Catalyst mailing list