version 1.2, 2013/01/04 01:37:02
|
version 1.3, 2015/05/17 17:34:43
|
Line 67 package Apache::lonshibauth;
|
Line 67 package Apache::lonshibauth;
|
|
|
use strict; |
use strict; |
use lib '/home/httpd/lib/perl/'; |
use lib '/home/httpd/lib/perl/'; |
|
use Apache::lonnet; |
use Apache::Constants qw(:common REDIRECT); |
use Apache::Constants qw(:common REDIRECT); |
use LONCAPA qw(:DEFAULT); |
use LONCAPA qw(:DEFAULT); |
|
|
Line 74 sub handler {
|
Line 75 sub handler {
|
my $r = shift; |
my $r = shift; |
my $target = '/adm/sso'; |
my $target = '/adm/sso'; |
if (($r->user eq '') && ($r->uri() ne $target)) { |
if (($r->user eq '') && ($r->uri() ne $target)) { |
my $dest = &Apache::lonnet::absolute_url($r->hostname()).$target; |
my $lonhost = $Apache::lonnet::perlvar{'lonHostID'}; |
|
my $hostname = &Apache::lonnet::hostname($lonhost); |
|
if (!$hostname) { $hostname = $r->hostname(); } |
|
my $protocol = $Apache::lonnet::protocol{$lonhost}; |
|
unless ($protocol eq 'https') { $protocol = 'http'; } |
|
my $dest = $protocol.'://'.$hostname.$target; |
$r->subprocess_env; |
$r->subprocess_env; |
if ($ENV{'QUERY_STRING'} ne '') { |
if ($ENV{'QUERY_STRING'} ne '') { |
$dest .= '?'.$ENV{'QUERY_STRING'}; |
$dest .= '?'.$ENV{'QUERY_STRING'}; |