Florian Ragwitz > CatalystX-SimpleLogin-0.01 > CatalystX::SimpleLogin::Controller::Login

Download:
CatalystX-SimpleLogin-0.01.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: CatalystX-SimpleLogin-0.18

NAME ^

CatalystX::SimpleLogin::Controller::Login - Configurable login controller

SYNOPSIS ^

    # For simple useage exmple, see CatalystX::SimpleLogin, this is a
    # full config example
    __PACKAGE__->config(
        'Controller::Login' => {
            login => 'WithRedirect', # Optional, enables redirect-back feature
            actions => {
                login => { # Also optional
                    PathPart => ['theloginpage'], # Change login action to /theloginpage
                },
                logout => {},
            },
        },
    );

DESCRIPTION ^

Controller base class which exists to have login roles composed onto it for the login and logout actions.

ATTRIBUTES ^

username_field

password_field

remember_field

METHODS ^

BUILD

Cause form instance to be built at application startup.

login

Login action

login_GET

Displays the login form

login_POST

Processes a submitted login form, and if correct, logs the user in and redirects

redirect_after_login_uri

If you are using WithRedirect (i.e. it has been set in your config), then you need to set 'redirect_after_login_uri' if you want something other than the default, which is $c->uri_for('/');

render_login_form

Renders the login form. By default it just calls the form's render method. If you want to do something different, like rendering the form with a template through your view, this is the place to hook into.

SEE ALSO ^

CatalystX::SimpleLogin::ControllerRole::Login::WithRedirect
CatalystX::SimpleLogin::Form::Login

AUTHORS ^

See CatalystX::SimpleLogin for authors.

LICENSE ^

See CatalystX::SimpleLogin for license.

syntax highlighting: