Lines 72-85
BEGIN {
Link Here
|
72 |
$ldap = C4::Context->config('useldapserver') || 0; |
72 |
$ldap = C4::Context->config('useldapserver') || 0; |
73 |
$cas = C4::Context->preference('casAuthentication'); |
73 |
$cas = C4::Context->preference('casAuthentication'); |
74 |
$caslogout = C4::Context->preference('casLogout'); |
74 |
$caslogout = C4::Context->preference('casLogout'); |
75 |
require C4::Auth_with_cas; # no import |
|
|
76 |
|
75 |
|
77 |
if ($ldap) { |
76 |
if ($ldap) { |
78 |
require C4::Auth_with_ldap; |
77 |
require C4::Auth_with_ldap; |
79 |
import C4::Auth_with_ldap qw(checkpw_ldap); |
78 |
import C4::Auth_with_ldap qw(checkpw_ldap); |
80 |
} |
79 |
} |
81 |
if ($cas) { |
80 |
if ($cas) { |
82 |
import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required); |
81 |
require C4::Auth_with_cas; # no import |
|
|
82 |
import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth); |
83 |
} |
83 |
} |
84 |
|
84 |
|
85 |
} |
85 |
} |
Lines 1340-1347
sub checkauth {
Link Here
|
1340 |
if ($cas) { |
1340 |
if ($cas) { |
1341 |
|
1341 |
|
1342 |
# Is authentication against multiple CAS servers enabled? |
1342 |
# Is authentication against multiple CAS servers enabled? |
1343 |
if ( C4::Auth_with_cas::multipleAuth && !$casparam ) { |
1343 |
require C4::Auth_with_cas; |
1344 |
my $casservers = C4::Auth_with_cas::getMultipleAuth(); |
1344 |
if ( multipleAuth() && !$casparam ) { |
|
|
1345 |
my $casservers = getMultipleAuth(); |
1345 |
my @tmplservers; |
1346 |
my @tmplservers; |
1346 |
foreach my $key ( keys %$casservers ) { |
1347 |
foreach my $key ( keys %$casservers ) { |
1347 |
push @tmplservers, { name => $key, value => login_cas_url( $query, $key, $type ) . "?cas=$key" }; |
1348 |
push @tmplservers, { name => $key, value => login_cas_url( $query, $key, $type ) . "?cas=$key" }; |