1CatalystX::SimpleLogin:U:sFeorrmC:o:nLtorgiibnu(t3e)d PeCraltaDloycsutmXe:n:tSaitmipolneLogin::Form::Login(3)
2
3
4
6 CatalystX::SimpleLogin::Form::Login - validation for the login form
7
9 A HTML::FormHandler form for the login form.
10
12 username
13 password
14 remember
15 submit
16
18 validate
19 add_auth_errors
20
22 CatalystX::SimpleLogin::Controller::Login
23
25 By default, the params passed to authenticate() are 'username' and
26 'password'. If you need to use different names, then you'll need to set
27 the correct value(s) via login_form_args in the configuration. The
28 keys are 'authenticate_username_field_name' and/or
29 'authenticate_password_field_name'.
30
31 __PACKAGE__->config(
32 'Controller::Login' => {
33 login_form_args => {
34 authenticate_username_field_name => 'name',
35 authenticate_password_field_name => 'password2',
36 },
37 },
38 );
39
40 You can also change the way that the form is displayed by setting
41 attributes. In MyApp.pm:
42
43 __PACKAGE__->config(
44 'Controller::Login' => {
45 login_form_args => {
46 login_error_message => 'Login failed',
47 field_list => [
48 '+submit' => { value => 'Login' },
49 ]
50 }
51 },
52 );
53
54 Additional fields can be added:
55
56 field_list => [
57 'foo' => ( type => 'MyField' ),
58 'bar' => { type => 'Text' },
59 ]
60
61 Additional arguments to the authenticate call can be added: If your
62 user table has a column "status" and you want only those with "status =
63 'active'"to be able to log .in
64
65 __PACKAGE__->config(
66 'Controller::Login' => {
67 login_form_args => {
68 authenticate_args => { status => 1 },
69 },
70 },
71 };
72
74 See CatalystX::SimpleLogin for authors.
75
77 See CatalystX::SimpleLogin for license.
78
79
80
81perl v5.34.0 2022-01C-a2t1alystX::SimpleLogin::Form::Login(3)