comparison Lib/IMPL/Web/Handler/SecureCookie.pm @ 263:0f59b2de72af

*fixed IMPL::DOM::Schema circular module references *modified IMPL::Object::Singleton, added auto-activation *code cleanups, docs
author sergey
date Wed, 09 Jan 2013 05:17:44 +0400
parents 4ac39b9e2ca4
children 63709a4e6da0
comparison
equal deleted inserted replaced
262:4ac39b9e2ca4 263:0f59b2de72af
36 my ($this,$sid,$cookie,$sign) = @_; 36 my ($this,$sid,$cookie,$sign) = @_;
37 37
38 return 1 if $sid and $cookie and $sign and $sign eq md5_hex($this->salt,$sid,$cookie,$this->salt); 38 return 1 if $sid and $cookie and $sign and $sign eq md5_hex($this->salt,$sid,$cookie,$this->salt);
39 39
40 return 0; 40 return 0;
41 }
42
43 sub AuthCookie {
44 my ($this,$sid,$cookie,$sign, $context) = @_;
45
46 if (eval { $context->auth->isa(AuthSimple) }) {
47 my ($result,$challenge) = $context->auth->DoAuth($cookie);
48 return $result;
49 }
50
51 return AUTH_FAIL;
41 } 52 }
42 53
43 sub Invoke { 54 sub Invoke {
44 my ($this,$action,$nextHandler) = @_; 55 my ($this,$action,$nextHandler) = @_;
45 56