--- loncom/auth/lonshibauth.pm 2021/12/12 20:49:26 1.14 +++ loncom/auth/lonshibauth.pm 2022/06/30 21:04:13 1.16 @@ -2,7 +2,7 @@ # Redirect Single Sign On authentication to designated URL: # /adm/sso, by default. # -# $Id: lonshibauth.pm,v 1.14 2021/12/12 20:49:26 raeburn Exp $ +# $Id: lonshibauth.pm,v 1.16 2022/06/30 21:04:13 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -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,11 @@ sub set_token { &Apache::lonnet::tmpdel($env{'form.ltoken'}); if ($info{'linkprot'}) { $extras .= '&linkprot='.&escape($info{'linkprot'}); + foreach my $item ('linkprotuser','linkprotexit') { + if ($info{$item} ne '') { + $extras .= '&'.$item.'='.&escape($info{$item}); + } + } last; } } else {