File: Root.pm

package info (click to toggle)
libcatalyst-authentication-store-htpasswd-perl 1.006-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 332 kB
  • sloc: perl: 451; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package TestApp::Controller::Root;
use strict;
use warnings;

__PACKAGE__->config(namespace => q{});

use base 'Catalyst::Controller';

# your actions replace this one
sub default : Private {
    my ($self, $c) = @_;
    my $body = '';
    if ($c->authenticate({ username => 'mufasa', password => 'Circle of Life'})) {
        $body .= "Authenticated:";
        $body .= $c->user->id;
    }
    $c->res->body($body);
}

1;