Lines 55-61
BEGIN {
Link Here
|
55 |
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); |
55 |
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); |
56 |
$ldap = C4::Context->config('useldapserver') || 0; |
56 |
$ldap = C4::Context->config('useldapserver') || 0; |
57 |
$cas = C4::Context->preference('casAuthentication'); |
57 |
$cas = C4::Context->preference('casAuthentication'); |
58 |
$shib = C4::Context->preference('shibbolethAuthentication'); |
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; |
Lines 822-828
sub checkauth {
Link Here
|
822 |
|| $userid |
822 |
|| $userid |
823 |
|| $shib |
823 |
|| $shib |
824 |
|| $pki_field ne 'None' |
824 |
|| $pki_field ne 'None' |
825 |
|| $persona ) |
825 |
|| $persona ) |
826 |
{ |
826 |
{ |
827 |
my $password = $query->param('password'); |
827 |
my $password = $query->param('password'); |
828 |
|
828 |
|
Lines 1080-1086
sub checkauth {
Link Here
|
1080 |
login => 1, |
1080 |
login => 1, |
1081 |
INPUTS => \@inputs, |
1081 |
INPUTS => \@inputs, |
1082 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1082 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1083 |
shibbolethAuthentication => C4::Context->preference("shibbolethAuthentication"), |
1083 |
shibbolethAuthentication => $shib, |
1084 |
suggestion => C4::Context->preference("suggestion"), |
1084 |
suggestion => C4::Context->preference("suggestion"), |
1085 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1085 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1086 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
1086 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
Lines 1599-1609
sub checkpw {
Link Here
|
1599 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
1599 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
1600 |
# shibboleth-authenticated user |
1600 |
# shibboleth-authenticated user |
1601 |
|
1601 |
|
1602 |
# Shibboleth attributes are mapped into http environmement variables, |
|
|
1603 |
# so we're getting the login of the user this way |
1604 |
my $attributename = C4::Context->preference('shibbolethLoginAttribute'); |
1605 |
my $attributevalue = $ENV{$attributename}; |
1606 |
|
1607 |
# Then, we check if it matches a valid koha user |
1602 |
# Then, we check if it matches a valid koha user |
1608 |
if ($shib_login) { |
1603 |
if ($shib_login) { |
1609 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |
1604 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |