fix Module::Install without . in @INC
[catagits/Catalyst-Plugin-Authentication.git] / t / lib / RemoteTestApp1 / Controller / Root.pm
CommitLineData
d055ce0c 1package RemoteTestApp1::Controller::Root;
2use strict;
3use warnings;
4use base qw/Catalyst::Controller/;
5
6__PACKAGE__->config(namespace => '');
7
8sub default : Local {
9 my ( $self, $c ) = @_;
10 if ($c->authenticate()) {
11 $c->res->body('User:' . $c->user->{username});
12 }
13 else {
14 $c->res->body('FAIL');
15 $c->res->status(403);
16 }
17}
18
19sub public : Local {
20 my ( $self, $c ) = @_;
21 $c->res->body('OK');
22}
23
241;
25