Ignore:
Timestamp:
12/28/12 15:05:24 (11 years ago)
Author:
nanardon
Message:

back to application side authentication to allow a working logout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Root.pm

    r1148 r1207  
    2525sub auth_required : Private { 
    2626    my ( $self, $c ) = @_; 
    27     $c->res->status(401); 
    28     $c->res->content_type('text/plain'); 
    29     $c->res->body('Authorization required.'); 
    30     $c->res->headers->push_header( 
    31         'WWW-Authenticate' => 'Basic realm="Link::Accounts"' 
    32     ); 
     27    $c->forward('login'); 
    3328} 
    3429 
     
    4742    } else { 
    4843        # No need to login for About section 
    49         if (!$c->authenticate({}, 'la')) { 
     44        if (!$c->authenticate({ username => $c->req->param('login'), password => 
     45                    $c->req->param('password') }, 'la')) { 
    5046            $c->forward('auth_required'); 
    5147            return; 
Note: See TracChangeset for help on using the changeset viewer.