X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=stemmaweb%2Flib%2Fstemmaweb.pm;h=b4984e66ae3c03e51ce06cee30225fed1f7cf484;hb=54e5debea0910d29adf1e76c2c27ba0032b0c122;hp=ee694737e97824d07b2e97dbc73068cd7635b572;hpb=5c9ecf6629514c0b83ccf41052f13f5f02e982f2;p=scpubgit%2Fstemmatology.git diff --git a/stemmaweb/lib/stemmaweb.pm b/stemmaweb/lib/stemmaweb.pm index ee69473..b4984e6 100644 --- a/stemmaweb/lib/stemmaweb.pm +++ b/stemmaweb/lib/stemmaweb.pm @@ -4,6 +4,10 @@ use namespace::autoclean; use Catalyst::Runtime 5.80; +use Search::GIN::Extract::Class; +use Search::GIN::Extract::Attributes; +use Search::GIN::Extract::Multiplex; + # Set flags and add plugins for the application. # # Note that ORDERING IS IMPORTANT here as plugins are initialized in order, @@ -17,10 +21,15 @@ use Catalyst::Runtime 5.80; # directory use Catalyst qw/ - -Debug ConfigLoader Static::Simple Unicode::Encoding + Authentication + Session + Session::Store::File + Session::State::Cookie + StatusMessage + StackTrace /; extends 'Catalyst'; @@ -44,6 +53,59 @@ __PACKAGE__->config( 'View::JSON' => { expose_stash => 'result', }, + 'View::TT' => { + INCLUDE_PATH => [ + stemmaweb->path_to( 'root', 'src' ), + ], + }, + ## kiokudb auth store testing + 'Plugin::Authentication' => { + default => { + credential => { + class => 'Password', + password_field => 'password', + password_type => 'self_check', + }, + store => { + class => 'Model::KiokuDB', + model_name => 'Directory', + }, + }, + openid => { + credential => { + class => 'OpenID', + extensions => ['http://openid.net/srv/ax/1.0' => + { + ns => 'ax', + uri => 'http://openid.net/srv/ax/1.0', + mode => 'fetch_request', + required => 'email', + 'type.email' => 'http://axschema.org/contact/email', + # type => { + # email => 'http://axschema.org/contact/email' + # } + } + ], + }, + store => { + class => 'Model::KiokuDB', + model_name => 'Directory', + }, + auto_create_user => 1, + }, + }, + ## Auth with CatalystX::Controller::Auth + 'Controller::Users' => { + model => 'User', + login_id_field => 'username', + login_db_field => 'username', + action_after_login => '/index', + send_register_email => 0, +# realm => 'openid', + login_fields => { openid => [qw/openid_identifier/], + default => [qw/username password/], + }, + }, ); # Start the application