aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-03-01 18:07:50 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-03-01 18:07:50 +0000
commitabf30bbf21ae1a51005bc81456ebd3e89fe98048 (patch)
treea3415fe99fb7dfed2c91589b00c31dacbf9b97b5
parentde2308840360b06461e63f7bd243814a713d8a84 (diff)
Added authentication plugins
-rw-r--r--Makefile.PL9
-rw-r--r--TODO.txt6
-rw-r--r--perllib/FixMyStreet/App.pm32
3 files changed, 40 insertions, 7 deletions
diff --git a/Makefile.PL b/Makefile.PL
index 2965c04db..7e94a47a4 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -9,13 +9,16 @@ use Module::Install::Catalyst;
name 'FixMyStreet-App';
all_from 'perllib/FixMyStreet/App.pm';
-requires 'Catalyst::Runtime' => '5.80031';
+requires 'Catalyst::Action::RenderView';
+requires 'Catalyst::Plugin::Authentication';
requires 'Catalyst::Plugin::ConfigLoader';
+requires 'Catalyst::Plugin::Session::Store::DBIC';
+requires 'Catalyst::Authentication::Store::DBIx::Class';
requires 'Catalyst::Plugin::Static::Simple';
-requires 'Catalyst::Action::RenderView';
+requires 'Catalyst::Runtime' => '5.80031';
+requires 'Config::General';
requires 'Moose';
requires 'namespace::autoclean';
-requires 'Config::General';
requires 'Path::Class';
requires 'Readonly';
diff --git a/TODO.txt b/TODO.txt
index 8d7130729..283619e62 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -10,4 +10,8 @@ Add users to system
-* extract group's thoughts from user issues email thread when it in done. \ No newline at end of file
+* extract group's thoughts from user issues email thread when it in done.
+
+
+* create darkpan for this project and utils to add modules to it.
+* script to build darkpan to local::lib \ No newline at end of file
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