Die gracefully on too short passwords.
[scpubgit/stemmaweb.git] / lib / stemmaweb / Authentication / FormHandler.pm
1 package stemmaweb::Authentication::FormHandler;
2
3 use HTML::FormHandler::Moose;
4 use namespace::autoclean;
5
6 extends 'HTML::FormHandlerX::Form::Login';
7
8 has_field email  => (
9     type => 'Text',
10     required => 0,
11 );
12
13 has_field id_token => (
14     type => 'Text',
15     required => 0,
16 );
17
18 # This must match the min length in Text::Tradition::Directory!
19
20 has_field password => (
21     type            => 'Password',
22     minlength       => 8,
23     required        => 1,
24     messages        => { required => 'Your password is required.' },
25     tags            => { no_errors => 1 },
26     wrapper_attr    => { id => 'field-password', },
27     inactive        => 1,
28 );
29
30 1;