Hi,

 I am trying to authenticate and I success : 

sub startup {
    my $self = shift;
    my $r = $self->routes;
    $r->get('/:layout')->to('login#nolog');
    $r->get('/:layout/logout')->to('login#logout');
    my $auth = $r->under( sub { return defined($self->session('userid'+)) } );
    $auth->get('/:layout/menu')->to('login#menu');
    $r->any('/:layout/:dummy')->to('login#nolog');}


I authenticate in Login.pm sub nolog, I define userid and I redirect to 
"upsmichel/menu", I expect "login/menu.html.ep" to be rendered but instead 
I am routed to a callback ? 
why ? What do I miss ?
Thanks
PC


Wed Nov 25 10:03:48 2015] [debug] GET "/upsmichel/nolog".
[Wed Nov 25 10:03:48 2015] [debug] Routing to controller 
"Myapp::Contr+oller::Login" and action "nolog".
[Wed Nov 25 10:03:48 2015] [debug] Rendering cached template 
"login/no+log.html.ep".
[Wed Nov 25 10:03:48 2015] [debug] Rendering cached template 
"layouts/+upsmichel.html.ep".
[Wed Nov 25 10:03:48 2015] [debug] 200 OK (0.061906s, 16.154/s).
[Wed Nov 25 10:04:02 2015] [debug] POST "/upsmichel/nolog".
[Wed Nov 25 10:04:02 2015] [debug] Routing to controller 
"Myapp::Contr+oller::Login" and action "nolog".
[Wed Nov 25 10:04:02 2015] [debug] 302 Found (0.031328s, 31.920/s).
[Wed Nov 25 10:04:02 2015] [debug] GET "/upsmichel/menu".
[Wed Nov 25 10:04:02 2015] [debug] Routing to a callback.
[Wed Nov 25 10:04:02 2015] [debug] Nothing has been rendered, expectin+g 
delayed response.
[download] 
<http://www.perlmonks.org/?abspart=1;displaytype=displaycode;node_id=1148590;part=2>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to