[system] / trunk / webwork2 / lib / WeBWorK / Authen.pm Repository:
ViewVC logotype

Annotation of /trunk/webwork2/lib/WeBWorK/Authen.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 305 - (view) (download) (as text)

1 : malsyned 305 package WeBWorK::Authen;
2 :    
3 :     sub new($$$) {
4 :     my $class = shift;
5 :     my $self = {};
6 :     ($self->{r}, $self->{courseEnvironment}) = @_;
7 :     bless $self, $class;
8 :     return $self;
9 :     }
10 :    
11 :     sub verify($) {
12 :     my $self = shift;
13 :     my $r = $self->{r};
14 :     if (!$r->param('user')) {
15 :     return 0;
16 :     }
17 :    
18 :     if ($r->param('key')) {
19 :     $r->param('passwd','');
20 :     return 1;
21 :     }
22 :     if ($r->param('passwd')) {
23 :     $r->param('passwd','');
24 :     $r->param('key','tH1siS@pH0n3Yk3y');
25 :     return 1;
26 :     }
27 :     return 0;
28 :     }
29 :    
30 :     1;

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9