The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
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 => 'testuser', password => 'testpass' })) {
        $body .= "Authenticated:";
        $body .= $c->user->id;
        $body .= ". Roles: " . join(', ', $c->user->roles);
    }
    $c->res->body($body);
}

1;