[LON-CAPA-cvs] cvs: loncom /auth lonshibauth.pm
raeburn
raeburn at source.lon-capa.org
Thu Oct 7 14:52:03 EDT 2021
raeburn Thu Oct 7 18:52:03 2021 EDT
Modified files:
/loncom/auth lonshibauth.pm
Log:
- When /adm/login is used as landing page for user toggle between SSO or
non-SSO, URL of original destination named firsturl in query string.
Index: loncom/auth/lonshibauth.pm
diff -u loncom/auth/lonshibauth.pm:1.7 loncom/auth/lonshibauth.pm:1.8
--- loncom/auth/lonshibauth.pm:1.7 Thu Oct 7 15:51:16 2021
+++ loncom/auth/lonshibauth.pm Thu Oct 7 18:52:03 2021
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Redirect Shibboleth authentication to designated URL (/adm/sso).
#
-# $Id: lonshibauth.pm,v 1.7 2021/10/07 15:51:16 raeburn Exp $
+# $Id: lonshibauth.pm,v 1.8 2021/10/07 18:52:03 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -94,8 +94,16 @@
if ($ENV{'QUERY_STRING'} ne '') {
$dest .= '?'.$ENV{'QUERY_STRING'};
}
- unless (($uri eq '/adm/roles') || ($ENV{'QUERY_STRING'} =~ /origurl=/)) {
- $dest.=(($dest=~/\?/)?'&':'?').'origurl='.$uri;
+ unless (($uri eq '/adm/roles') || ($uri eq '/adm/logout')) {
+ if ($target eq '/adm/login') {
+ unless ($ENV{'QUERY_STRING'} =~ /firsturl=/) {
+ $dest.=(($dest=~/\?/)?'&':'?').'firsturl='.$uri;
+ }
+ } else {
+ unless ($ENV{'QUERY_STRING'} =~ /origurl=/)) {
+ $dest.=(($dest=~/\?/)?'&':'?').'origurl='.$uri;
+ }
+ }
}
$r->header_out(Location => $dest);
return REDIRECT;
More information about the LON-CAPA-cvs
mailing list