Lines 1982-1991
sub checkpw {
Link Here
|
1982 |
|
1982 |
|
1983 |
# Nothing to check, account is locked |
1983 |
# Nothing to check, account is locked |
1984 |
} elsif ( $ldap && defined($password) ) { |
1984 |
} elsif ( $ldap && defined($password) ) { |
1985 |
my ( $retval, $retcard, $retuserid ); |
1985 |
my ( $retval, $retcard, $retuserid, $ldap_patron ); |
1986 |
( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1986 |
( $retval, $retcard, $retuserid, $ldap_patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1987 |
if ( $retval == 1 ) { |
1987 |
if ( $retval == 1 ) { |
1988 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
1988 |
@return = ( $retval, $retcard, $retuserid, $ldap_patron ); |
|
|
1989 |
$patron = $ldap_patron; |
1989 |
$passwd_ok = 1; |
1990 |
$passwd_ok = 1; |
1990 |
} |
1991 |
} |
1991 |
$check_internal_as_fallback = 1 if $retval == 0; |
1992 |
$check_internal_as_fallback = 1 if $retval == 0; |
Lines 1995-2004
sub checkpw {
Link Here
|
1995 |
# In case of a CAS authentication, we use the ticket instead of the password |
1996 |
# In case of a CAS authentication, we use the ticket instead of the password |
1996 |
my $ticket = $query->param('ticket'); |
1997 |
my $ticket = $query->param('ticket'); |
1997 |
$query->delete('ticket'); # remove ticket to come back to original URL |
1998 |
$query->delete('ticket'); # remove ticket to come back to original URL |
1998 |
my ( $retval, $retcard, $retuserid, $cas_ticket, $patron ) = |
1999 |
my ( $retval, $retcard, $retuserid, $cas_ticket, $cas_patron ) = |
1999 |
checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
2000 |
checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
2000 |
if ($retval) { |
2001 |
if ($retval) { |
2001 |
@return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket ); |
2002 |
@return = ( $retval, $retcard, $retuserid, $cas_patron, $cas_ticket ); |
|
|
2003 |
$patron = $cas_patron; |
2002 |
} else { |
2004 |
} else { |
2003 |
@return = (0); |
2005 |
@return = (0); |
2004 |
} |
2006 |
} |
Lines 2016-2025
sub checkpw {
Link Here
|
2016 |
|
2018 |
|
2017 |
# Then, we check if it matches a valid koha user |
2019 |
# Then, we check if it matches a valid koha user |
2018 |
if ($shib_login) { |
2020 |
if ($shib_login) { |
2019 |
my ( $retval, $retcard, $retuserid, $patron ) = |
2021 |
my ( $retval, $retcard, $retuserid, $shib_patron ) = |
2020 |
C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
2022 |
C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
2021 |
if ($retval) { |
2023 |
if ($retval) { |
2022 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2024 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
|
|
2025 |
$patron = $shib_patron; |
2023 |
} |
2026 |
} |
2024 |
$passwd_ok = $retval; |
2027 |
$passwd_ok = $retval; |
2025 |
} |
2028 |
} |
2026 |
- |
|
|