Commit | Line | Data |
---|---|---|
16585083 | 1 | package TestApp::Controller::Root; |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | __PACKAGE__->config(namespace => q{}); | |
6 | ||
7 | use base 'Catalyst::Controller'; | |
8 | ||
9 | # your actions replace this one | |
29150588 | 10 | sub default : Private { |
16585083 | 11 | my ($self, $c) = @_; |
12 | my $body = ''; | |
13 | if ($c->authenticate({ username => 'mufasa', password => 'Circle of Life'})) { | |
29150588 | 14 | $body .= "Authenticated:"; |
16585083 | 15 | $body .= $c->user->id; |
16 | } | |
17 | $c->res->body($body); | |
18 | } | |
19 | ||
20 | 1; |