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 826-832
sub checkauth {
Link Here
|
826 |
|| $userid |
826 |
|| $userid |
827 |
|| $shib |
827 |
|| $shib |
828 |
|| $pki_field ne 'None' |
828 |
|| $pki_field ne 'None' |
829 |
|| $persona ) |
829 |
|| $persona ) |
830 |
{ |
830 |
{ |
831 |
my $password = $query->param('password'); |
831 |
my $password = $query->param('password'); |
832 |
|
832 |
|
Lines 1084-1090
sub checkauth {
Link Here
|
1084 |
login => 1, |
1084 |
login => 1, |
1085 |
INPUTS => \@inputs, |
1085 |
INPUTS => \@inputs, |
1086 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1086 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1087 |
shibbolethAuthentication => C4::Context->preference("shibbolethAuthentication"), |
1087 |
shibbolethAuthentication => $shib, |
1088 |
suggestion => C4::Context->preference("suggestion"), |
1088 |
suggestion => C4::Context->preference("suggestion"), |
1089 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1089 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1090 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
1090 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
Lines 1602-1612
sub checkpw {
Link Here
|
1602 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
1602 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
1603 |
# shibboleth-authenticated user |
1603 |
# shibboleth-authenticated user |
1604 |
|
1604 |
|
1605 |
# Shibboleth attributes are mapped into http environmement variables, |
|
|
1606 |
# so we're getting the login of the user this way |
1607 |
my $attributename = C4::Context->preference('shibbolethLoginAttribute'); |
1608 |
my $attributevalue = $ENV{$attributename}; |
1609 |
|
1610 |
# Then, we check if it matches a valid koha user |
1605 |
# Then, we check if it matches a valid koha user |
1611 |
if ($shib_login) { |
1606 |
if ($shib_login) { |
1612 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |
1607 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |