3 use namespace::autoclean;
5 use Catalyst::Runtime 5.80;
7 use Search::GIN::Extract::Class;
8 use Search::GIN::Extract::Attributes;
9 use Search::GIN::Extract::Multiplex;
11 # Set flags and add plugins for the application.
13 # Note that ORDERING IS IMPORTANT here as plugins are initialized in order,
14 # therefore you almost certainly want to keep ConfigLoader at the head of the
15 # list if you're using it.
17 # -Debug: activates the debug mode for very useful log messages
18 # ConfigLoader: will load the configuration from a Config::General file in the
19 # application's home directory
20 # Static::Simple: will serve static files from the application's root
29 Session::State::Cookie
36 use stemmaweb::Authentication::FormHandler;
38 our $VERSION = '0.01';
40 # Configure the application.
42 # Note that settings in stemmaweb.conf (or other external
43 # configuration file that you set up manually) take precedence
44 # over this when using ConfigLoader. Thus configuration
45 # details given here can function as a default configuration,
46 # with an external configuration file acting as an override for
51 # Disable deprecated behavior needed by old applications
52 disable_component_resolution_regex_fallback => 1,
53 # Set Unicode as the default
57 expose_stash => 'result',
61 stemmaweb->path_to( 'root', 'src' ),
64 ## kiokudb auth store testing
65 'Plugin::Authentication' => {
69 password_field => 'password',
70 password_type => 'self_check',
73 class => 'Model::KiokuDB',
74 model_name => 'Directory',
80 extensions => ['http://openid.net/srv/ax/1.0' =>
83 uri => 'http://openid.net/srv/ax/1.0',
84 mode => 'fetch_request',
86 'type.email' => 'http://axschema.org/contact/email',
88 # email => 'http://axschema.org/contact/email'
94 class => 'Model::KiokuDB',
95 model_name => 'Directory',
97 auto_create_user => 1,
101 class => '+stemmaweb::Authentication::Credential::Google',
104 class => 'Model::KiokuDB',
105 model_name => 'Directory',
107 auto_create_user => 1,
110 ## Auth with CatalystX::Controller::Auth
111 'Controller::Users' => {
112 form_handler => 'stemmaweb::Authentication::FormHandler',
114 login_id_field => 'username',
115 login_db_field => 'username',
116 action_after_login => '/users/success',
117 action_after_register => '/users/success',
118 enable_sending_register_email => 0,
119 register_email_from => '"Stemmaweb" <stemmaweb@byzantini.st>',
120 register_email_subject => 'Registration to stemmaweb',
121 register_email_template_plain => 'register-plain.tt',
123 login_fields => { openid => [qw/openid_identifier/],
124 default => [qw/username password remember/],
125 google => [qw/email id_token/],
128 'View::Email::Template' => {
129 stash_key => 'email_template',
133 pub_key => '6LfR19MSAAAAACy2meHvLfZGRn3PM2rRYIAfh665',
134 priv_key => '6LfR19MSAAAAAMlQb8BdyecWNRE1bAL2YSgz2sah',
138 # Start the application
139 __PACKAGE__->setup();
144 stemmaweb - Catalyst based application
148 script/stemmaweb_server.pl
152 [enter your description here]
156 L<stemmaweb::Controller::Root>, L<Catalyst>
164 This library is free software. You can redistribute it and/or modify
165 it under the same terms as Perl itself.