Diff for /loncom/auth/checkauthen.pm between versions 1.1 and 1.12

version 1.1, 2005/11/29 21:02:50 version 1.12, 2007/10/02 01:09:59
Line 36  use Apache::lonnet; Line 36  use Apache::lonnet;
 sub handler {  sub handler {
     my ($r) = @_;      my ($r) = @_;
   
       if (&Apache::lonnet::is_domainimage($r->uri)) {
           return OK;
       }
   
       if ($r->auth_type() ne 'LONCAPA') {
    return DECLINED;
       }
     my $fail = FORBIDDEN;       my $fail = FORBIDDEN; 
     if ($r->dir_config('lonOtherAuthen') eq 'yes') {      if ($r->dir_config('lonOtherAuthen') eq 'yes') {
  &Apache::lonnet::logthis("other authen");   if (defined($r->dir_config('lonOtherAuthenType'))) {
               $r->auth_type($r->dir_config('lonOtherAuthenType'));
           }
    #&Apache::lonnet::logthis("other authen");
  $fail = DECLINED;   $fail = DECLINED;
     }      }
   
Line 51  sub handler { Line 61  sub handler {
  }   }
     }      }
   
     my %cookies=CGI::Cookie->parse($r->header_in('Cookie'));      my $handle = &Apache::lonnet::check_for_valid_session($r);
     my $lonid=$cookies{'lonID'};      if ($handle eq '') {
     my $cookie;          $handle = $env{'user.environment'};
     if ($lonid) {      }
  my $handle=$lonid->value;  
         $handle=~s/\W//g;      if ($handle ne '') {
         my $lonidsdir=$r->dir_config('lonIDsDir');          return OK;
         if ((-e "$lonidsdir/$handle.id") && ($handle ne '')) {      
     return OK;  
  }  
     }      }
   
     return $fail;      return $fail;

Removed from v.1.1  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>