-
-
22 Dec 2020 11:17:30 UTC
- Distribution: CatalystX-SimpleLogin
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Repository
- Issues
- Testers (148 / 0 / 0)
- Kwalitee
Bus factor: 11- 96.17% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (48.65KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Catalyst::Action::REST
- Catalyst::Plugin::Authentication
- Catalyst::Plugin::Session
- Catalyst::Runtime
- Catalyst::View::TT
- CatalystX::Component::Traits
- CatalystX::InjectComponent
- HTML::FormHandler
- Moose
- MooseX::MethodAttributes
- MooseX::RelatedClassRoles
- MooseX::Types
- MooseX::Types::Common
- Try::Tiny
- namespace::autoclean
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
CatalystX::SimpleLogin::Form::Login - validation for the login form
DESCRIPTION
A HTML::FormHandler form for the login form.
FIELDS
- username
- password
- remember
- submit
METHODS
- validate
- add_auth_errors
SEE ALSO
CUSTOMIZATION
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' }, ]
Additional arguments to the authenticate call can be added: If your user table has a column
status
and you want only those withstatus = 'active'
to be able to log .in__PACKAGE__->config( 'Controller::Login' => { login_form_args => { authenticate_args => { status => 1 }, }, }, };
AUTHORS
See CatalystX::SimpleLogin for authors.
LICENSE
See CatalystX::SimpleLogin for license.
Module Install Instructions
To install CatalystX::SimpleLogin, copy and paste the appropriate command in to your terminal.
cpanm CatalystX::SimpleLogin
perl -MCPAN -e shell install CatalystX::SimpleLogin
For more information on module installation, please visit the detailed CPAN module installation guide.