|
Lines 54-60
BEGIN {
Link Here
|
| 54 |
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); |
54 |
%EXPORT_TAGS = ( EditPermissions => [qw(get_all_subpermissions get_user_subpermissions)] ); |
| 55 |
$ldap = C4::Context->config('useldapserver') || 0; |
55 |
$ldap = C4::Context->config('useldapserver') || 0; |
| 56 |
$cas = C4::Context->preference('casAuthentication'); |
56 |
$cas = C4::Context->preference('casAuthentication'); |
| 57 |
$shib = C4::Context->preference('shibbolethAuthentication'); |
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; |
|
Lines 805-811
sub checkauth {
Link Here
|
| 805 |
|| $userid |
805 |
|| $userid |
| 806 |
|| $shib |
806 |
|| $shib |
| 807 |
|| $pki_field ne 'None' |
807 |
|| $pki_field ne 'None' |
| 808 |
|| $persona ) |
808 |
|| $persona ) |
| 809 |
{ |
809 |
{ |
| 810 |
my $password = $query->param('password'); |
810 |
my $password = $query->param('password'); |
| 811 |
|
811 |
|
|
Lines 1063-1069
sub checkauth {
Link Here
|
| 1063 |
login => 1, |
1063 |
login => 1, |
| 1064 |
INPUTS => \@inputs, |
1064 |
INPUTS => \@inputs, |
| 1065 |
casAuthentication => C4::Context->preference("casAuthentication"), |
1065 |
casAuthentication => C4::Context->preference("casAuthentication"), |
| 1066 |
shibbolethAuthentication => C4::Context->preference("shibbolethAuthentication"), |
1066 |
shibbolethAuthentication => $shib, |
| 1067 |
suggestion => C4::Context->preference("suggestion"), |
1067 |
suggestion => C4::Context->preference("suggestion"), |
| 1068 |
virtualshelves => C4::Context->preference("virtualshelves"), |
1068 |
virtualshelves => C4::Context->preference("virtualshelves"), |
| 1069 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
1069 |
LibraryName => "" . C4::Context->preference("LibraryName"), |
|
Lines 1581-1591
sub checkpw {
Link Here
|
| 1581 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
1581 |
# (defined in the shibbolethLoginAttribute) tto contain the login of the |
| 1582 |
# shibboleth-authenticated user |
1582 |
# shibboleth-authenticated user |
| 1583 |
|
1583 |
|
| 1584 |
# Shibboleth attributes are mapped into http environmement variables, |
|
|
| 1585 |
# so we're getting the login of the user this way |
| 1586 |
my $attributename = C4::Context->preference('shibbolethLoginAttribute'); |
| 1587 |
my $attributevalue = $ENV{$attributename}; |
| 1588 |
|
| 1589 |
# Then, we check if it matches a valid koha user |
1584 |
# Then, we check if it matches a valid koha user |
| 1590 |
if ($shib_login) { |
1585 |
if ($shib_login) { |
| 1591 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |
1586 |
my ( $retval, $retcard, $retuserid ) = C4::Auth_with_Shibboleth::checkpw_shib( $dbh, $shib_login ); # EXTERNAL AUTH |