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
38 use stemmaweb::Authentication::FormHandler;
40 our $VERSION = '0.01';
42 # Configure the application.
44 # Note that settings in stemmaweb.conf (or other external
45 # configuration file that you set up manually) take precedence
46 # over this when using ConfigLoader. Thus configuration
47 # details given here can function as a default configuration,
48 # with an external configuration file acting as an override for
53 # Disable deprecated behavior needed by old applications
54 disable_component_resolution_regex_fallback => 1,
55 # Set Unicode as the default
59 expose_stash => 'result',
63 stemmaweb->path_to( 'root', 'src' ),
69 class => 'Cache::FileCache',
71 default_expires_in => 86400,
75 ## kiokudb auth store testing
76 'Plugin::Authentication' => {
80 password_field => 'password',
81 password_type => 'self_check',
84 class => 'Model::KiokuDB',
85 model_name => 'Directory',
91 extensions => ['http://openid.net/srv/ax/1.0' =>
94 uri => 'http://openid.net/srv/ax/1.0',
95 mode => 'fetch_request',
97 'type.email' => 'http://axschema.org/contact/email',
99 # email => 'http://axschema.org/contact/email'
105 class => 'Model::KiokuDB',
106 model_name => 'Directory',
108 auto_create_user => 1,
112 class => '+stemmaweb::Authentication::Credential::Google',
115 class => 'Model::KiokuDB',
116 model_name => 'Directory',
118 auto_create_user => 1,
121 ## Auth with CatalystX::Controller::Auth
122 'Controller::Users' => {
123 form_handler => 'stemmaweb::Authentication::FormHandler',
125 login_id_field => 'username',
126 login_db_field => 'username',
127 action_after_login => '/users/success',
128 action_after_register => '/users/success',
129 enable_sending_register_email => 0,
130 register_email_from => '"Stemmaweb" <stemmaweb@byzantini.st>',
131 register_email_subject => 'Registration to stemmaweb',
132 register_email_template_plain => 'register-plain.tt',
134 login_fields => { openid => [qw/openid_identifier/],
135 default => [qw/username password remember/],
136 google => [qw/email id_token/],
139 'View::Email::Template' => {
140 stash_key => 'email_template',
144 pub_key => '6LfR19MSAAAAACy2meHvLfZGRn3PM2rRYIAfh665',
145 priv_key => '6LfR19MSAAAAAMlQb8BdyecWNRE1bAL2YSgz2sah',
149 # Start the application
150 __PACKAGE__->setup();
155 stemmaweb - Catalyst based application
159 script/stemmaweb_server.pl
163 [enter your description here]
167 L<stemmaweb::Controller::Root>, L<Catalyst>
175 This library is free software. You can redistribute it and/or modify
176 it under the same terms as Perl itself.