SHARE
TWEET

Untitled

a guest Apr 12th, 2013 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sub handler {
  2.     my ($session) = @_;
  3.  
  4.         my $user = $session->user->username;
  5. #       $session->errorHandler->warn("Verify User: ".$user." REMOTE_USER: ".$ENV{'REMOTE_USER'});
  6.  
  7.         if ($user ne "Visitor" && $user ne $ENV{'REMOTE_USER'} && $ENV{'QUERY_STRING'} =~ m/ssoViaSessionId/){
  8.                 $session->user({ userId => "1" });
  9.  
  10.                 return $session->style->userStyle( "Sorry you are attempting to login to this site with invalid credentials. If you have reached this page in error please contact globalnoc\@iu.edu." );
  11.         }
  12.         if ($user eq "Visitor" && WebGUI::User->newByUsername($session,$ENV{'REMOTE_USER'})){
  13.                 my $auth = WebGUI::Auth::CoSign->new($session,"CoSign",$ENV{'REMOTE_USER'});
  14.                 $auth->login($ENV{'REMOTE_USER'});
  15.  
  16.         }
  17.  
  18.         return "";
  19.  
  20. }
  21.  
  22. 1;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top