comparison Lib/IMPL/Web/Security.pm @ 116:1722ca51537c

minor changes. Auth no more throws an exception when fails
author wizard
date Mon, 31 May 2010 08:30:39 +0400
parents 0e72ad99eef7
children 4267a2ac3d46
comparison
equal deleted inserted replaced
115:5edc2ac5231c 116:1722ca51537c
32 } else { 32 } else {
33 die new IMPL::SecurityException("Authentication failed","A sec data for the $package isn't found"); 33 die new IMPL::SecurityException("Authentication failed","A sec data for the $package isn't found");
34 } 34 }
35 35
36 my ($status,$answer) = $auth->DoAuth($challenge); 36 my ($status,$answer) = $auth->DoAuth($challenge);
37
38 if ($status == AUTH_FAIL) {
39 die new IMPL::SecurityException("Authentication failed","DoAuth failed");
40 }
41 37
42 return { 38 return {
43 status => $status, 39 status => $status,
44 answer => $answer, 40 answer => $answer,
45 context => $this->MakeContext( $user, [$user->roles], $auth ) 41 context => $this->MakeContext( $user, [$user->roles], $auth )