Epic cleanup and code shuffle in tests to avoid warnings
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / RemoteTestApp2 / Controller / Root.pm
CommitLineData
d055ce0c 1package RemoteTestApp2::Controller::Root;
2use strict;
3use warnings;
4use base 'Catalyst::Controller';
5
6__PACKAGE__->config(namespace => '');
7
8sub default : Local {
9 my ( $self, $c ) = @_;
10 if ($c->authenticate()) {
11 $c->res->body(
12 'my_user_name:'
13 . $c->user->{my_user_name}
14 );
15 }
16 else {
17 $c->res->body('FAIL');
18 $c->res->status(403);
19 }
20}
21
22sub public : Local {
23 my ( $self, $c ) = @_;
24 $c->res->body('OK');
25}
26
271;
28