Diff for /loncom/auth/lonauth.pm between versions 1.41 and 1.43

version 1.41, 2003/02/20 06:49:23 version 1.43, 2003/03/02 02:16:53
Line 156  sub success { Line 156  sub success {
  print $idf "request.course.uri=\n";   print $idf "request.course.uri=\n";
  print $idf "request.course.sec=\n";   print $idf "request.course.sec=\n";
  print $idf "request.role=cm\n";   print $idf "request.role=cm\n";
  print $idf "request.host=$ENV{'HTTP_HOST'}\n";   print $idf "request.host=$ENV{'REMOTE_ADDR'}\n";
  if ($FORM{'interface'}) {   if ($FORM{'interface'}) {
     $FORM{'interface'}=~s/\W//gs;      $FORM{'interface'}=~s/\W//gs;
     print $idf "browser.interface=$FORM{'interface'}\n";      print $idf "browser.interface=$FORM{'interface'}\n";
Line 196  sub success { Line 196  sub success {
     my $startupremote=&Apache::lonmenu::startupremote($lowerurl);      my $startupremote=&Apache::lonmenu::startupremote($lowerurl);
     my $setflags=&Apache::lonmenu::setflags();      my $setflags=&Apache::lonmenu::setflags();
     my $maincall=&Apache::lonmenu::maincall();      my $maincall=&Apache::lonmenu::maincall();
       my $bodytag=&Apache::loncommon::bodytag('Successful Login');
 # ------------------------------------------------- Output for successful login  # ------------------------------------------------- Output for successful login
   
     $r->send_cgi_header(<<ENDHEADER);      $r->send_cgi_header(<<ENDHEADER);
Line 209  ENDHEADER Line 210  ENDHEADER
 <title>Successful Login to the LearningOnline Network with CAPA</title>  <title>Successful Login to the LearningOnline Network with CAPA</title>
 $startupremote  $startupremote
 </head>  </head>
 <body bgcolor="#FFFFFF">  $bodytag
 $setflags  $setflags
 $windowinfo  $windowinfo
 <h1>Welcome!</h1>  <h1>Welcome!</h1>
Line 227  ENDSUCCESS Line 228  ENDSUCCESS
   
 sub failed {  sub failed {
     my ($r,$message) = @_;      my ($r,$message) = @_;
       my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login');
     $r->send_cgi_header(<<ENDFHEADER);      $r->send_cgi_header(<<ENDFHEADER);
 Content-type: text/html  Content-type: text/html
   
Line 237  ENDFHEADER Line 239  ENDFHEADER
 <title>Unsuccessful Login to the LearningOnline Network with CAPA</title>  <title>Unsuccessful Login to the LearningOnline Network with CAPA</title>
 </head>  </head>
 <html>  <html>
 <body bgcolor="#FFFFFF">  $bodytag
 <h1>Sorry ...</h1>  <h1>Sorry ...</h1>
 <h2>$message to use the Learning<i>Online</i> Network with CAPA</h2>  <p><b>$message</b></p>
   <p>Please <a href="/adm/login?username=$FORM{'uname'}&domain=$FORM{'udom'}">login</a> again.</p>
   <p>
   <a href="/adm/loginproblems.html">Problems?</a></p>
 </body>  </body>
 </html>  </html>
 ENDFAILED  ENDFAILED
Line 264  sub handler { Line 269  sub handler {
     }       } 
   
     if ((!$FORM{'uname'}) || (!$FORM{'upass'}) || (!$FORM{'udom'})) {      if ((!$FORM{'uname'}) || (!$FORM{'upass'}) || (!$FORM{'udom'})) {
  failed($r,'Username, password and domain need to be specified');   failed($r,'Username, password and domain need to be specified.');
         return OK;          return OK;
     }      }
     $FORM{'uname'} =~ s/\W//g;      $FORM{'uname'} =~ s/\W//g;
Line 280  sub handler { Line 285  sub handler {
                                       $FORM{'serverid'});                                        $FORM{'serverid'});
   
     if (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost')) {      if (($tmpinfo=~/^error/) || ($tmpinfo eq 'con_lost')) {
  failed($r,'Login token missing, inaccessible or expired');   failed($r,'Information needed to verify your login information is missing, inaccessible or expired.');
         return OK;          return OK;
     }      }
           
Line 312  sub handler { Line 317  sub handler {
 # --------------------------------------------------------------------- Failed?  # --------------------------------------------------------------------- Failed?
   
     if ($authhost eq 'no_host') {      if ($authhost eq 'no_host') {
  failed($r,'Username and/or password could not be authenticated');   failed($r,'Username and/or password could not be authenticated.');
         return OK;          return OK;
     }      }
   

Removed from v.1.41  
changed lines
  Added in v.1.43


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