--- loncom/auth/lonauth.pm 2003/02/20 06:49:23 1.41 +++ loncom/auth/lonauth.pm 2003/03/02 03:58:55 1.44 @@ -1,7 +1,7 @@ # The LearningOnline Network # User Authentication Module # -# $Id: lonauth.pm,v 1.41 2003/02/20 06:49:23 albertel Exp $ +# $Id: lonauth.pm,v 1.44 2003/03/02 03:58:55 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -156,7 +156,7 @@ sub success { print $idf "request.course.uri=\n"; print $idf "request.course.sec=\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'}) { $FORM{'interface'}=~s/\W//gs; print $idf "browser.interface=$FORM{'interface'}\n"; @@ -196,6 +196,7 @@ sub success { my $startupremote=&Apache::lonmenu::startupremote($lowerurl); my $setflags=&Apache::lonmenu::setflags(); my $maincall=&Apache::lonmenu::maincall(); + my $bodytag=&Apache::loncommon::bodytag('Successful Login'); # ------------------------------------------------- Output for successful login $r->send_cgi_header(<Successful Login to the LearningOnline Network with CAPA $startupremote - +$bodytag $setflags $windowinfo

Welcome!

@@ -227,6 +228,7 @@ ENDSUCCESS sub failed { my ($r,$message) = @_; + my $bodytag=&Apache::loncommon::bodytag('Unsuccessful Login'); $r->send_cgi_header(<Unsuccessful Login to the LearningOnline Network with CAPA - +$bodytag

Sorry ...

-

$message to use the LearningOnline Network with CAPA

+

$message

+

Please login again.

+

+Problems?

ENDFAILED @@ -264,7 +269,7 @@ sub handler { } 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; } $FORM{'uname'} =~ s/\W//g; @@ -280,10 +285,14 @@ sub handler { $FORM{'serverid'}); 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; + } else { + unless (&Apache::lonnet::reply('tmpdel:'.$FORM{'logtoken'}, + $FORM{'serverid'}) eq 'ok') { + &failed($r,'Session could not be opened.'); + } } - my ($key,$firsturl)=split(/&/,$tmpinfo); my $keybin=pack("H16",$key); @@ -312,7 +321,7 @@ sub handler { # --------------------------------------------------------------------- Failed? 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; }