View | Details | Raw Unified | Return to bug 28417
Collapse All | Expand All

(-)a/C4/Auth.pm (-4 / +5 lines)
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" };
(-)a/C4/Auth_with_cas.pm (-2 / +1 lines)
Lines 33-39 our (@ISA, @EXPORT_OK); Link Here
33
BEGIN {
33
BEGIN {
34
    require Exporter;
34
    require Exporter;
35
    @ISA   = qw(Exporter);
35
    @ISA   = qw(Exporter);
36
    @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required);
36
    @EXPORT_OK = qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multilpleAuth getMultipleAuth);
37
}
37
}
38
my $defaultcasserver;
38
my $defaultcasserver;
39
my $casservers;
39
my $casservers;
40
- 

Return to bug 28417