2008-11-25 11:01:42 +00:00
|
|
|
package Hydra;
|
2008-10-28 10:19:31 +00:00
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
2008-11-28 14:36:04 +00:00
|
|
|
use Hydra::Helper::Nix;
|
2008-10-28 10:19:31 +00:00
|
|
|
|
|
|
|
use Catalyst::Runtime '5.70';
|
|
|
|
|
|
|
|
use parent qw/Catalyst/;
|
2011-11-25 15:44:18 +00:00
|
|
|
use Catalyst qw/ConfigLoader
|
2008-10-28 10:19:31 +00:00
|
|
|
Static::Simple
|
|
|
|
StackTrace
|
2008-11-26 19:48:04 +00:00
|
|
|
Authentication
|
2008-11-26 23:25:24 +00:00
|
|
|
Authorization::Roles
|
2008-11-26 19:48:04 +00:00
|
|
|
Session
|
|
|
|
Session::Store::FastMmap
|
|
|
|
Session::State::Cookie
|
2011-11-29 17:09:46 +00:00
|
|
|
AccessLog
|
2008-10-28 10:19:31 +00:00
|
|
|
/;
|
|
|
|
our $VERSION = '0.01';
|
|
|
|
|
2008-11-18 14:48:40 +00:00
|
|
|
__PACKAGE__->config(
|
2008-11-25 11:01:42 +00:00
|
|
|
name => 'Hydra',
|
2008-11-28 14:36:04 +00:00
|
|
|
default_view => "TT",
|
|
|
|
session => {
|
|
|
|
storage => getHydraPath . "/session_data"
|
2008-11-29 00:04:45 +00:00
|
|
|
},
|
|
|
|
authentication => {
|
|
|
|
default_realm => "dbic",
|
|
|
|
realms => {
|
|
|
|
dbic => {
|
|
|
|
credential => {
|
|
|
|
class => "Password",
|
|
|
|
password_field => "password",
|
|
|
|
password_type => "hashed",
|
|
|
|
password_hash_type => "SHA-1",
|
|
|
|
},
|
|
|
|
store => {
|
|
|
|
class => "DBIx::Class",
|
|
|
|
user_class => "DB::Users",
|
|
|
|
role_relation => "userroles",
|
|
|
|
role_field => "role",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2011-09-15 08:27:17 +00:00
|
|
|
},
|
|
|
|
'View::JSON' => {
|
|
|
|
expose_stash => qr/^json/,
|
|
|
|
},
|
|
|
|
'Plugin::Session' => {
|
|
|
|
expires => 3600 * 24 * 2,
|
|
|
|
},
|
2008-11-28 14:36:04 +00:00
|
|
|
);
|
2008-10-28 10:19:31 +00:00
|
|
|
|
|
|
|
__PACKAGE__->setup();
|
|
|
|
|
|
|
|
1;
|