Allow having no captcha, add registration test
[scpubgit/stemmaweb.git] / lib / stemmaweb.pm
index 00c52cc..1a9da7d 100644 (file)
@@ -33,6 +33,8 @@ use Catalyst qw/
 
 extends 'Catalyst';
 
+use stemmaweb::Authentication::FormHandler;
+
 our $VERSION = '0.01';
 
 # Configure the application.
@@ -101,11 +103,13 @@ __PACKAGE__->config(
             store => {
                 class => 'Model::KiokuDB',
                 model_name => 'Directory',
-            }
+            },
+            auto_create_user => 1,
         },
     },
     ## Auth with CatalystX::Controller::Auth
     'Controller::Users' => {
+        form_handler => 'stemmaweb::Authentication::FormHandler',
         model => 'User',
         login_id_field => 'username',
         login_db_field => 'username',
@@ -118,6 +122,7 @@ __PACKAGE__->config(
         realm => 'default',
         login_fields => { openid => [qw/openid_identifier/],
                           default => [qw/username password remember/],
+                          google => [qw/email id_token/],
         },
     },
     'View::Email::Template' => {