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

(-)a/C4/Auth.pm (-3 / +3 lines)
Lines 58-70 BEGIN { Link Here
58
    $shib        = C4::Context->config('useshibboleth') || 0;
58
    $shib        = C4::Context->config('useshibboleth') || 0;
59
    $caslogout   = C4::Context->preference('casLogout');
59
    $caslogout   = C4::Context->preference('casLogout');
60
    require C4::Auth_with_cas;             # no import
60
    require C4::Auth_with_cas;             # no import
61
    require C4::Auth_with_Shibboleth;
61
    require C4::Auth_with_shibboleth;
62
    if ($ldap) {
62
    if ($ldap) {
63
    require C4::Auth_with_ldap;
63
    require C4::Auth_with_ldap;
64
    import C4::Auth_with_ldap qw(checkpw_ldap);
64
    import C4::Auth_with_ldap qw(checkpw_ldap);
65
    }
65
    }
66
    if ($shib) {
66
    if ($shib) {
67
        import C4::Auth_with_Shibboleth
67
        import C4::Auth_with_shibboleth
68
          qw(checkpw_shib logout_shib login_shib_url get_login_shib);
68
          qw(checkpw_shib logout_shib login_shib_url get_login_shib);
69
69
70
        # Get shibboleth login attribute
70
        # Get shibboleth login attribute
Lines 1624-1630 sub checkpw { Link Here
1624
1624
1625
        # Then, we check if it matches a valid koha user
1625
        # Then, we check if it matches a valid koha user
1626
        if ($shib_login) {
1626
        if ($shib_login) {
1627
            my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login );    # EXTERNAL AUTH
1627
            my ( $retval, $retcard, $retuserid ) = C4::Auth_with_shibboleth::checkpw_shib( $dbh, $shib_login );    # EXTERNAL AUTH
1628
            ($retval) and return ( $retval, $retcard, $retuserid );
1628
            ($retval) and return ( $retval, $retcard, $retuserid );
1629
            return 0;
1629
            return 0;
1630
        }
1630
        }
(-)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 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
use CGI;
22
use CGI;
23
use C4::Auth;    # get_template_and_user
23
use C4::Auth;    # get_template_and_user
24
use C4::Auth_with_Shibboleth qw( login_shib_url );
24
use C4::Auth_with_shibboleth qw( login_shib_url );
25
use C4::Output;
25
use C4::Output;
26
use C4::NewsChannels;    # GetNewsToDisplay
26
use C4::NewsChannels;    # GetNewsToDisplay
27
use C4::Languages qw(getTranslatedLanguages accept_language);
27
use C4::Languages qw(getTranslatedLanguages accept_language);
Lines 48-54 $template->param( Link Here
48
if ( C4::Context->config('useshibboleth') ) {
48
if ( C4::Context->config('useshibboleth') ) {
49
    $template->param(
49
    $template->param(
50
        shibbolethAuthentication => C4::Context->config('useshibboleth'),
50
        shibbolethAuthentication => C4::Context->config('useshibboleth'),
51
        shibbolethLoginUrl => C4::Auth_with_Shibboleth::login_shib_url($input)
51
        shibbolethLoginUrl => C4::Auth_with_shibboleth::login_shib_url($input)
52
    );
52
    );
53
};
53
};
54
54
55
- 

Return to bug 8446