diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-03-01 18:07:50 +0000 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-03-01 18:07:50 +0000 |
commit | abf30bbf21ae1a51005bc81456ebd3e89fe98048 (patch) | |
tree | a3415fe99fb7dfed2c91589b00c31dacbf9b97b5 /perllib/FixMyStreet/App.pm | |
parent | de2308840360b06461e63f7bd243814a713d8a84 (diff) |
Added authentication plugins
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r-- | perllib/FixMyStreet/App.pm | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm index 6282e58b6..4f99a367b 100644 --- a/perllib/FixMyStreet/App.pm +++ b/perllib/FixMyStreet/App.pm @@ -8,8 +8,13 @@ use FixMyStreet::Cobrand; use Memcached; use Problems; -use Catalyst # - 'Static::Simple'; +use Catalyst ( + 'Static::Simple', # + 'Session', + 'Session::Store::DBIC', + 'Session::State::Cookie', + 'Authentication', +); extends 'Catalyst'; @@ -29,7 +34,28 @@ __PACKAGE__->config( static => { # include_path => [ FixMyStreet->path_to("web") . "" ], ignore_extensions => ['cgi'], - } + }, + + 'Plugin::Session' => { # Catalyst::Plugin::Session::Store::DBIC + dbic_class => 'DB::Session', + expires => 3600 * 24 * 7 * 6, # 6 months + }, + + 'Plugin::Authentication' => { + default_realm => 'default', + default => { + credential => { # Catalyst::Authentication::Credential::Password + class => 'Password', + password_field => 'password', + password_type => 'hashed', + password_hash_type => 'SHA-1', + }, + store => { # Catalyst::Authentication::Store::DBIx::Class + class => 'DBIx::Class', + user_model => 'DB::User', + }, + }, + }, ); # Start the application |