comparison Lib/IMPL/Security/Auth/Simple.pm @ 68:739f1288ca84

Auth in progress
author wizard
date Tue, 23 Mar 2010 16:55:25 +0300
parents 15d720913562
children d92d5ddaf524
comparison
equal deleted inserted replaced
67:9f5795a10939 68:739f1288ca84
1 package IMPL::Security::Auth::Simple; 1 package IMPL::Security::Auth::Simple;
2 2
3 use base qw(IMPL::Security::Auth); 3 use base qw(IMPL::Security::Auth);
4 use Digest::MD5; 4 use Digest::MD5;
5 import IMPL::Security::Auth qw(:Const GenSSID);
6 5
7 use IMPL::Class::Property; 6 use IMPL::Class::Property;
8 7
9 BEGIN { 8 BEGIN {
10 private property _passwordImage => prop_all; 9 private property _passwordImage => prop_all;
19 18
20 sub DoAuth { 19 sub DoAuth {
21 my ($this,$challenge) = @_; 20 my ($this,$challenge) = @_;
22 21
23 if (Digest::MD5::md5_hex($challenge) eq $this->_passwordImage) { 22 if (Digest::MD5::md5_hex($challenge) eq $this->_passwordImage) {
24 return (SUCCESS,$this->_sessionCookie(GenSSID)); 23 return (SUCCESS,$this->_sessionCookie($this->GenSSID));
25 } elsee { 24 } elsee {
26 return (FAIL,undef); 25 return (FAIL,undef);
27 } 26 }
28 } 27 }
29 28