Lines 1999-2007
sub checkpw {
Link Here
|
1999 |
|
1999 |
|
2000 |
# Nothing to check, account is locked |
2000 |
# Nothing to check, account is locked |
2001 |
} elsif ( $ldap && defined($password) ) { |
2001 |
} elsif ( $ldap && defined($password) ) { |
2002 |
my ( $retval, $retcard, $retuserid ); |
2002 |
my ( $retval, $retcard, $retuserid, $ldap_patron ); |
2003 |
( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
2003 |
( $retval, $retcard, $retuserid, $ldap_patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
2004 |
if ( $retval == 1 ) { |
2004 |
if ( $retval == 1 ) { |
|
|
2005 |
$patron = $ldap_patron if $ldap_patron; |
2005 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2006 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2006 |
$passwd_ok = 1; |
2007 |
$passwd_ok = 1; |
2007 |
} |
2008 |
} |
Lines 2012-2020
sub checkpw {
Link Here
|
2012 |
# In case of a CAS authentication, we use the ticket instead of the password |
2013 |
# In case of a CAS authentication, we use the ticket instead of the password |
2013 |
my $ticket = $query->param('ticket'); |
2014 |
my $ticket = $query->param('ticket'); |
2014 |
$query->delete('ticket'); # remove ticket to come back to original URL |
2015 |
$query->delete('ticket'); # remove ticket to come back to original URL |
2015 |
my ( $retval, $retcard, $retuserid, $cas_ticket, $patron ) = |
2016 |
my ( $retval, $retcard, $retuserid, $cas_ticket, $cas_patron ) = |
2016 |
checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
2017 |
checkpw_cas( $ticket, $query, $type ); # EXTERNAL AUTH |
2017 |
if ($retval) { |
2018 |
if ($retval) { |
|
|
2019 |
$patron = $cas_patron if $cas_patron; |
2018 |
@return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket ); |
2020 |
@return = ( $retval, $retcard, $retuserid, $patron, $cas_ticket ); |
2019 |
} else { |
2021 |
} else { |
2020 |
@return = (0); |
2022 |
@return = (0); |
Lines 2033-2041
sub checkpw {
Link Here
|
2033 |
|
2035 |
|
2034 |
# Then, we check if it matches a valid koha user |
2036 |
# Then, we check if it matches a valid koha user |
2035 |
if ($shib_login) { |
2037 |
if ($shib_login) { |
2036 |
my ( $retval, $retcard, $retuserid, $patron ) = |
2038 |
my ( $retval, $retcard, $retuserid, $shib_patron ) = |
2037 |
C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
2039 |
C4::Auth_with_shibboleth::checkpw_shib($shib_login); # EXTERNAL AUTH |
2038 |
if ($retval) { |
2040 |
if ($retval) { |
|
|
2041 |
$patron = $shib_patron if $shib_patron; |
2039 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2042 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2040 |
} |
2043 |
} |
2041 |
$passwd_ok = $retval; |
2044 |
$passwd_ok = $retval; |
2042 |
- |
|
|