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

(-)a/C4/Auth.pm (-3 / +3 lines)
Lines 57-69 BEGIN { Link Here
57
    $shib        = C4::Context->config('useshibboleth') || 0;
57
    $shib        = C4::Context->config('useshibboleth') || 0;
58
    $caslogout   = C4::Context->preference('casLogout');
58
    $caslogout   = C4::Context->preference('casLogout');
59
    require C4::Auth_with_cas;             # no import
59
    require C4::Auth_with_cas;             # no import
60
    require C4::Auth_with_Shibboleth;
60
    require C4::Auth_with_shibboleth;
61
    if ($ldap) {
61
    if ($ldap) {
62
    require C4::Auth_with_ldap;
62
    require C4::Auth_with_ldap;
63
    import C4::Auth_with_ldap qw(checkpw_ldap);
63
    import C4::Auth_with_ldap qw(checkpw_ldap);
64
    }
64
    }
65
    if ($shib) {
65
    if ($shib) {
66
        import C4::Auth_with_Shibboleth
66
        import C4::Auth_with_shibboleth
67
          qw(checkpw_shib logout_shib login_shib_url get_login_shib);
67
          qw(checkpw_shib logout_shib login_shib_url get_login_shib);
68
68
69
        # Get shibboleth login attribute
69
        # Get shibboleth login attribute
Lines 1603-1609 sub checkpw { Link Here
1603
1603
1604
        # Then, we check if it matches a valid koha user
1604
        # Then, we check if it matches a valid koha user
1605
        if ($shib_login) {
1605
        if ($shib_login) {
1606
            my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login );    # EXTERNAL AUTH
1606
            my ( $retval, $retcard, $retuserid ) = C4::Auth_with_shibboleth::checkpw_shib( $dbh, $shib_login );    # EXTERNAL AUTH
1607
            ($retval) and return ( $retval, $retcard, $retuserid );
1607
            ($retval) and return ( $retval, $retcard, $retuserid );
1608
            return 0;
1608
            return 0;
1609
        }
1609
        }
(-)a/C4/Auth_with_shibboleth.pm (-1 / +1 lines)
Lines 1-4 Link Here
1
package C4::Auth_with_Shibboleth;
1
package C4::Auth_with_shibboleth;
2
2
3
# Copyright 2011 BibLibre
3
# Copyright 2011 BibLibre
4
#
4
#
(-)a/opac/opac-main.pl (-3 / +2 lines)
Lines 20-26 use strict; Link Here
20
use warnings;
20
use warnings;
21
use CGI;
21
use CGI;
22
use C4::Auth;    # get_template_and_user
22
use C4::Auth;    # get_template_and_user
23
use C4::Auth_with_Shibboleth qw( login_shib_url );
23
use C4::Auth_with_shibboleth qw( login_shib_url );
24
use C4::Output;
24
use C4::Output;
25
use C4::NewsChannels;    # get_opac_news
25
use C4::NewsChannels;    # get_opac_news
26
use C4::Languages qw(getTranslatedLanguages accept_language);
26
use C4::Languages qw(getTranslatedLanguages accept_language);
Lines 47-53 $template->param( Link Here
47
if ( C4::Context->config('useshibboleth') ) {
47
if ( C4::Context->config('useshibboleth') ) {
48
    $template->param(
48
    $template->param(
49
        shibbolethAuthentication => C4::Context->config('useshibboleth'),
49
        shibbolethAuthentication => C4::Context->config('useshibboleth'),
50
        shibbolethLoginUrl => C4::Auth_with_Shibboleth::login_shib_url($input)
50
        shibbolethLoginUrl => C4::Auth_with_shibboleth::login_shib_url($input)
51
    );
51
    );
52
};
52
};
53
53
54
- 

Return to bug 8446