annotate Lib/IMPL/Security/Auth/Simple.pm @ 53:cf23fd8423f4

minor changes
author wizard
date Tue, 02 Mar 2010 02:57:09 +0300
parents a1498298d3ee
children 15d720913562
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
51
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
1 package IMPL::Security::Auth::Simple;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
2
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
3 use base qw(IMPL::Security::Auth);
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
4 use Digest::MD5;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
5 import IMPL::Security::Auth qw(:Const);
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
6
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
7 sub DoAuth {
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
8 my ($this,$clientData,$serverData) = @_;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
9
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
10 if (Digest::MD5::md5_hex($clientData) eq $serverData) {
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
11 return SUCCESS;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
12 } elsee {
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
13 return FAIL;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
14 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
15 }
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
16
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
17 1;
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
18
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
19 __END__
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
20
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
21 =pod
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
22
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
23 =head1 DESCRIPTION
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
24
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
25 Модуль простой авторизации
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
26
a1498298d3ee Security in progress
wizard@linux-odin.local
parents:
diff changeset
27 =cut