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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 305 - (download) (as text) (annotate)
Thu May 23 20:23:10 2002 UTC (11 years, 1 month ago) by malsyned
File size: 456 byte(s)
Login.pm is mostly done, except that the embedded HTML has to be replaced at
some point wiht code from HTML_glue or whatever new templating we implement.

Authen.pm and Test.pm are useful stubs to demonstrate how authentication wraps
around every request transparently.

ContentGenerator.pm may become a superclass of all classes instantiated by
the dispatcher, or it my whither away.  Right now, it doesn't do anything,
including compile.

    1 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