--- loncom/lontrans.pm 2021/11/03 01:04:03 1.37 +++ loncom/lontrans.pm 2021/12/06 03:31:54 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network # URL translation for User Files # -# $Id: lontrans.pm,v 1.37 2021/11/03 01:04:03 raeburn Exp $ +# $Id: lontrans.pm,v 1.38 2021/12/06 03:31:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -57,6 +57,10 @@ sub handler { if ($alias) { my $lonhost = $r->dir_config('lonHostID'); my $hostname = &Apache::lonnet::hostname($lonhost); + my $ssourl = '/adm/sso'; + if ($r->dir_config('lonOtherAuthenUrl') ne '') { + $ssourl = $r->dir_config('lonOtherAuthenUrl'); + } if (($hdrhost eq $alias) || ($hdrhost eq $hostname)) { my $proxyinfo = &Apache::lonnet::get_proxy_settings($r->dir_config('lonDefDomain')); my ($vpnint,$vpnext); @@ -71,8 +75,8 @@ sub handler { ($r->uri !~ m{^/adm/(lti|launch)/})) { $redirect = $hostname; } - if ($r->uri eq '/adm/sso') { - if (&Apache::lonnet::alias_shibboleth($lonhost)) { + if ($r->uri eq $ssourl) { + if (&Apache::lonnet::alias_sso($lonhost)) { undef($redirect); } else { $redirect = $hostname; @@ -93,8 +97,8 @@ sub handler { if (exists($iphost{$remote_ip})) { undef($redirect); } - } elsif ($r->uri eq '/adm/sso') { - unless (&Apache::lonnet::alias_shibboleth($lonhost)) { + } elsif ($r->uri eq $ssourl) { + unless (&Apache::lonnet::alias_sso($lonhost)) { undef($redirect); } } @@ -105,7 +109,7 @@ sub handler { if (($uri eq '/adm/switchserver') || ($uri =~ m{^/Shibboleth.sso/})) { return DECLINED; } - unless (($uri eq '/adm/migrateuser') || ($uri eq '/adm/sso')) { + unless (($uri eq '/adm/migrateuser') || ($uri eq $ssourl)) { my %user; my $handle = &Apache::lonnet::check_for_valid_session($r,undef,\%user); if (($handle) && ($user{'name'} ne '') && ($user{'domain'} ne '')) {