X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstemmaweb.pm;h=f9e109289b8d70b99b37a97d43f68fbfa9f986c2;hb=36bc4a163c063d6b820beb167cb0f8282c7d6074;hp=00c52cc24565932c1e43c31b0608626d8b7a9dbb;hpb=85990daf0e04461abd1b789fb283848dd583c134;p=scpubgit%2Fstemmaweb.git diff --git a/lib/stemmaweb.pm b/lib/stemmaweb.pm index 00c52cc..f9e1092 100644 --- a/lib/stemmaweb.pm +++ b/lib/stemmaweb.pm @@ -29,10 +29,14 @@ use Catalyst qw/ Session::State::Cookie StatusMessage StackTrace + Cache /; extends 'Catalyst'; +use Cache::FileCache; +use stemmaweb::Authentication::FormHandler; + our $VERSION = '0.01'; # Configure the application. @@ -59,6 +63,15 @@ __PACKAGE__->config( stemmaweb->path_to( 'root', 'src' ), ], }, + + 'Plugin::Cache' => { + backend => { + class => 'Cache::FileCache', + namespace => 'cache', + default_expires_in => 86400, + }, + }, + ## kiokudb auth store testing 'Plugin::Authentication' => { default => { @@ -101,11 +114,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 +133,7 @@ __PACKAGE__->config( realm => 'default', login_fields => { openid => [qw/openid_identifier/], default => [qw/username password remember/], + google => [qw/email id_token/], }, }, 'View::Email::Template' => {