version 1.1465, 2021/09/21 22:54:27
|
version 1.1468, 2021/10/11 00:27:15
|
Line 2304 sub retrieve_inst_usertypes {
|
Line 2304 sub retrieve_inst_usertypes {
|
|
|
sub is_domainimage { |
sub is_domainimage { |
my ($url) = @_; |
my ($url) = @_; |
if ($url=~m-^/+res/+($match_domain)/+\1\-domainconfig/+(img|logo|domlogo)/+[^/]-) { |
if ($url=~m-^/+res/+($match_domain)/+\1\-domainconfig/+(img|logo|domlogo|login)/+[^/]-) { |
if (&domain($1) ne '') { |
if (&domain($1) ne '') { |
return '1'; |
return '1'; |
} |
} |
Line 14387 sub machine_ids {
|
Line 14387 sub machine_ids {
|
|
|
sub additional_machine_domains { |
sub additional_machine_domains { |
my @domains; |
my @domains; |
open(my $fh,"<","$perlvar{'lonTabDir'}/expected_domains.tab"); |
if (-e "$perlvar{'lonTabDir'}/expected_domains.tab") { |
while( my $line = <$fh>) { |
if (open(my $fh,"<","$perlvar{'lonTabDir'}/expected_domains.tab")) { |
$line =~ s/\s//g; |
while (my $line = <$fh>) { |
push(@domains,$line); |
chomp($line); |
|
$line =~ s/\s//g; |
|
push(@domains,$line); |
|
} |
|
close($fh); |
|
} |
} |
} |
return @domains; |
return @domains; |
} |
} |
Line 14603 sub use_proxy_alias {
|
Line 14608 sub use_proxy_alias {
|
if ($alias) { |
if ($alias) { |
my $dom = &host_domain($lonid); |
my $dom = &host_domain($lonid); |
if ($dom ne '') { |
if ($dom ne '') { |
my $proxyinfo = &get_proxy_settings($dom ); |
my $proxyinfo = &get_proxy_settings($dom); |
my ($vpnint,$remote_ip); |
my ($vpnint,$remote_ip); |
if (ref($proxyinfo) eq 'HASH') { |
if (ref($proxyinfo) eq 'HASH') { |
$vpnint = $proxyinfo->{'vpnint'}; |
$vpnint = $proxyinfo->{'vpnint'}; |
Line 14617 sub use_proxy_alias {
|
Line 14622 sub use_proxy_alias {
|
} |
} |
} |
} |
return; |
return; |
|
} |
|
|
|
sub alias_shibboleth { |
|
my ($lonid) = @_; |
|
if ($lonid eq '') { |
|
$lonid = $perlvar{'lonHostID'}; |
|
} |
|
if (!defined(&hostname($lonid))) { |
|
return; |
|
} |
|
if ($lonid ne '') { |
|
my ($use_alias,$cached) = &is_cached_new('proxysaml',$lonid); |
|
if ($cached) { |
|
return $use_alias; |
|
} |
|
my $dom = &Apache::lonnet::host_domain($lonid); |
|
if ($dom ne '') { |
|
my $cachetime = 60*60*24; |
|
my %domconfig = |
|
&Apache::lonnet::get_dom('configuration',['wafproxy'],$dom); |
|
if (ref($domconfig{'wafproxy'}) eq 'HASH') { |
|
if (ref($domconfig{'wafproxy'}{'saml'}) eq 'HASH') { |
|
$use_alias = $domconfig{'wafproxy'}{'saml'}{$lonid}; |
|
} |
|
} |
|
return &do_cache_new('proxysaml',$lonid,$use_alias,$cachetime); |
|
} |
|
} |
|
return; |
} |
} |
|
|
sub get_saml_landing { |
sub get_saml_landing { |