CatalystX::SimpleLogin::Form::Login - validation for the login form


CatalystX-SimpleLogin documentation  | view source Contained in the CatalystX-SimpleLogin distribution.

Index


NAME

Top

CatalystX::SimpleLogin::Form::Login - validation for the login form

DESCRIPTION

Top

A HTML::FormHandler form for the login form.

FIELDS

Top

username
password
remember
submit

METHODS

Top

validate
add_auth_errors

SEE ALSO

Top

CatalystX::SimpleLogin::ControllerRole::Login

CUSTOMIZATION

Top

By default, the params passed to authenticate() are 'username' and 'password'. If you need to use different names, then you'll need to set the correct value(s) via login_form_args in the configuration. The keys are 'authenticate_username_field_name' and/or 'authenticate_password_field_name'.

    __PACKAGE__->config(
        'Controller::Login' => {
            login_form_args => {
               authenticate_username_field_name => 'name',
               authenticate_password_field_name => 'password2',
            }
        },
    );

You can also change the way that the form is displayed by setting attributes. In MyApp.pm:

    __PACKAGE__->config(
        'Controller::Login' => {
            login_form_args => {
               login_error_message => 'Login failed',
               field_list => [
                   '+submit' => { value => 'Login' },
               ]
            }
        },
    );

Additional fields can be added:

   field_list => [
       'foo' => ( type => 'MyField' ),
       'bar' => { type => 'Text' },
   ]

AUTHORS

Top

See CatalystX::SimpleLogin for authors.

LICENSE

Top

See CatalystX::SimpleLogin for license.


CatalystX-SimpleLogin documentation  | view source Contained in the CatalystX-SimpleLogin distribution.