--- loncom/auth/lonshibauth.pm 2021/12/06 03:31:54 1.13 +++ loncom/auth/lonshibauth.pm 2022/06/18 02:10:18 1.15 @@ -2,7 +2,7 @@ # Redirect Single Sign On authentication to designated URL: # /adm/sso, by default. # -# $Id: lonshibauth.pm,v 1.13 2021/12/06 03:31:54 raeburn Exp $ +# $Id: lonshibauth.pm,v 1.15 2022/06/18 02:10:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -234,7 +234,7 @@ sub handler { unless ($protocol eq 'https') { $protocol = 'http'; } my $alias = &Apache::lonnet::use_proxy_alias($r,$lonhost); if (($alias ne '') && - (&Apache::lonnet::alias_shibboleth($lonhost))) { + (&Apache::lonnet::alias_sso($lonhost))) { $hostname = $alias; } my $dest = $protocol.'://'.$hostname.$target; @@ -293,6 +293,10 @@ sub set_token { &Apache::lonacc::get_posted_cgi($r,['linkkey']); } } + unless (($r->is_initial_req()) || ($env{'form.ltoken'}) || + ($env{'form.linkkey'})) { + return; + } } my $extras; foreach my $name (@names) { @@ -302,6 +306,9 @@ sub set_token { &Apache::lonnet::tmpdel($env{'form.ltoken'}); if ($info{'linkprot'}) { $extras .= '&linkprot='.&escape($info{'linkprot'}); + if ($info{'linkprotuser'} ne '') { + $extras .= '&linkprotuser='.&escape($info{'linkprotuser'}); + } last; } } else {