[LON-CAPA-cvs] cvs: loncom /auth lonlogout.pm
raeburn
raeburn at source.lon-capa.org
Wed Mar 4 16:34:28 EST 2015
raeburn Wed Mar 4 21:34:28 2015 EDT
Modified files:
/loncom/auth lonlogout.pm
Log:
- Two additional PerlVars supported:
lonSSOUserLogoutHeadFile and lonSSOUserLogoutHeadFile_$dom (where $dom
is domain of user logging out, to allow custom HTML to be included in head
tag for users in domain: $dom who originally logged in via SSO.
- Example:
<meta http-equiv="Refresh" content="5; url=https://login.msu.edu/Logout.asp" />
Index: loncom/auth/lonlogout.pm
diff -u loncom/auth/lonlogout.pm:1.46 loncom/auth/lonlogout.pm:1.47
--- loncom/auth/lonlogout.pm:1.46 Fri Feb 8 17:03:41 2013
+++ loncom/auth/lonlogout.pm Wed Mar 4 21:34:28 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Logout Handler
#
-# $Id: lonlogout.pm,v 1.46 2013/02/08 17:03:41 raeburn Exp $
+# $Id: lonlogout.pm,v 1.47 2015/03/04 21:34:28 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -103,13 +103,27 @@
$start_page=&Apache::loncommon::start_page('Switching Server ...',
$switch);
} else {
- $start_page=&Apache::loncommon::start_page('Logged Out',undef,
+ my $domain = $env{'user.domain'};
+ my $headextra;
+ if ($env{'request.sso.login'}
+ && defined($r->dir_config("lonSSOUserLogoutHeadFile_$domain"))) {
+ if (open(my $fh,$r->dir_config("lonSSOUserLogoutHeadFile_$domain"))) {
+ $headextra = join('',<$fh>);
+ close($fh);
+ }
+ }
+ if ($env{'request.sso.login'}
+ && defined($r->dir_config('lonSSOUserLogoutHeadFile'))) {
+ if (open(my $fh,$r->dir_config('lonSSOUserLogoutHeadFile'))) {
+ $headextra.= join('',<$fh>);
+ }
+ }
+ $start_page=&Apache::loncommon::start_page('Logged Out',$headextra,
{'no_nav_bar' => 1,});
$relogmessage.='<h1>'.&mt('Goodbye').'</h1>'
.'<p>'.&mt('Thank you for using LON-CAPA.').'</p>';
- my $domain = $env{'user.domain'};
if (!$env{'request.sso.norelogin'}) {
my ($relogin_server,$login_url);
if ($env{'request.sso.reloginserver'}) {
@@ -164,15 +178,18 @@
}
if ($env{'request.sso.login'}
&& defined($r->dir_config("lonSSOUserLogoutMessageFile_$domain"))) {
- open(my $fh,$r->dir_config("lonSSOUserLogoutMessageFile_$domain"));
- $relogmessage.= join('',<$fh>);
+ if (open(my $fh,$r->dir_config("lonSSOUserLogoutMessageFile_$domain"))) {
+ $relogmessage.= join('',<$fh>);
+ close($fh);
+ }
}
if ($env{'request.sso.login'}
&& defined($r->dir_config('lonSSOUserLogoutMessageFile'))) {
- open(my $fh,$r->dir_config('lonSSOUserLogoutMessageFile'));
- $relogmessage.= join('',<$fh>);
+ if (open(my $fh,$r->dir_config('lonSSOUserLogoutMessageFile'))) {
+ $relogmessage.= join('',<$fh>);
+ close($fh);
+ }
}
-
}
my $end_page=&Apache::loncommon::end_page();
# --------------------------------------------------------------- Screen Output
More information about the LON-CAPA-cvs
mailing list