Catalyst::Plugin::Authentication::Credential::NoPassword(3pm)

Catalyst::Plugin::Authentication::Credential::NoPassword3pm

Authenticate a user without a password.

Usage

    use Catalyst qw/
      Authentication
      /;
    package MyApp::Controller::Auth;
    sub login_as_another_user : Local {
        my ($self, $c) = @_;
        if ($c->user_exists() and $c->user->username() eq 'root') {
            $c->authenticate( {id => c->req->params->{user_id}}, 'nopassword' );
        }
    }

Overview

This authentication credential checker takes authentication information (most often a username) and retrieves the user from the store. No validation of any credentials is done. This is intended for administrative backdoors, SAML logins and so on when you have identified the new user by other means.

Configuration

    # example
    <Plugin::Authentication>
        <nopassword>
            <credential>
                class = NoPassword
            </credential>
            <store>
                class = DBIx::Class
                user_model = DB::User
                role_relation = roles
                role_field = name
            </store>
        </nopassword>
    </Plugin::Authentication>

Methods

authenticate ( $c, $realm, $authinfo )

Try to log a user in.

From libcatalyst-modules-perl 44 in Debian 7 (Wheezy). Parsed by carta from the page's man source.