comparison Lib/IMPL/Security/Auth.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents d1676be8afcc
children 6d8092d8ce1b
comparison
equal deleted inserted replaced
193:8e8401c0aea4 194:4d0e1962161c
1 package IMPL::Security::Auth; 1 package IMPL::Security::Auth;
2 2
3 use Digest::MD5 qw(md5_hex); 3 use Digest::MD5 qw(md5_hex);
4 4
5 use constant { 5 use constant {
6 AUTH_SUCCESS => 1, 6 AUTH_SUCCESS => 1,
7 AUTH_INCOMPLETE => 2, 7 AUTH_INCOMPLETE => 2,
8 AUTH_FAIL => 3 8 AUTH_FAIL => 3
9 }; 9 };
10 10
11 use parent qw(Exporter); 11 use parent qw(Exporter);
12 12
13 our @EXPORT_OK = qw(&AUTH_SUCCESS &AUTH_INCOMPLETE &AUTH_FAIL &GenSSID); 13 our @EXPORT_OK = qw(&AUTH_SUCCESS &AUTH_INCOMPLETE &AUTH_FAIL &GenSSID);
19 return md5_hex(time,rand,$i++); 19 return md5_hex(time,rand,$i++);
20 } 20 }
21 } 21 }
22 22
23 sub DoAuth { 23 sub DoAuth {
24 die new IMPL::NotImplementedException; 24 die new IMPL::NotImplementedException;
25 } 25 }
26 26
27 sub ValidateSession { 27 sub ValidateSession {
28 die new IMPL::NotImplementedException; 28 die new IMPL::NotImplementedException;
29 } 29 }
30 30
31 sub isTrusted { 31 sub isTrusted {
32 0; 32 0;
33 } 33 }
34 34
35 sub Create { 35 sub Create {
36 my ($self,%args) = @_; 36 my ($self,%args) = @_;
37 37
38 return $self->new($self->CreateSecData(%args)); 38 return $self->new($self->CreateSecData(%args));
39 } 39 }
40 40
41 1; 41 1;
42 42
43 __END__ 43 __END__