Changeset 229
- Timestamp:
- 06/05/09 13:56:00 (15 years ago)
- Location:
- LATMOS-Accounts-Web
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LATMOS-Accounts-Web/Makefile.PL
r94 r229 10 10 requires 'YAML'; # This should reflect the config file format you've chosen 11 11 # See Catalyst::Plugin::ConfigLoader for supported formats 12 requires 'Catalyst::Plugin::Authentication' => '0'; 13 requires 'Catalyst::Plugin::Session' => '0'; 14 requires 'Catalyst::Plugin::Session::Store::FastMmap' => '0'; 15 requires 'Catalyst::Plugin::Session::State::Cookie' => '0'; 12 16 catalyst; 13 17 -
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm
r221 r229 20 20 Session::State::Cookie 21 21 Session::Store::FastMmap 22 Authentication 22 23 /; 23 24 … … 34 35 35 36 __PACKAGE__->config( name => 'LATMOS::Accounts::Web' ); 37 38 __PACKAGE__->config->{'Plugin::Authentication'} = { 39 default_realm => 'la', 40 realms => { 41 la => { 42 credential => { 43 class => 'La' 44 }, 45 store => { 46 class => 'Null', 47 }, 48 }, 49 }, 50 }; 51 36 52 37 53 # Start the application -
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller.pm
r225 r229 42 42 } 43 43 $c->stash->{mainmenu} = $menu; 44 if (!$c->user_exists && $c->req->path ne 'login') { 45 $c->forward('/login'); 46 } 44 47 } 45 48 -
LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm
r148 r229 32 32 } 33 33 34 sub login : Local { 35 my ( $self, $c ) = @_; 36 37 $c->stash->{template} = 'login.tt'; 38 if ($c->req->param('username')) { 39 if ($c->authenticate({ 40 username => $c->req->param('username'), 41 password => $c->req->param('password')})) { 42 $c->res->redirect($c->req->param('loguri') || '/'); 43 } else { 44 warn "invalid login"; 45 } 46 } 47 } 48 49 sub logout : Local { 50 my ( $self, $c ) = @_; 51 $c->logout; 52 $c->res->redirect('/'); 53 } 54 34 55 =head2 end 35 56
Note: See TracChangeset
for help on using the changeset viewer.