Lines 82-95
BEGIN {
Link Here
|
82 |
get_template_and_user haspermission create_basic_session |
82 |
get_template_and_user haspermission create_basic_session |
83 |
); |
83 |
); |
84 |
|
84 |
|
85 |
$ldap = C4::Context->config('useldapserver') || 0; |
|
|
86 |
$cas = C4::Context->preference('casAuthentication'); |
85 |
$cas = C4::Context->preference('casAuthentication'); |
87 |
$caslogout = C4::Context->preference('casLogout'); |
86 |
$caslogout = C4::Context->preference('casLogout'); |
88 |
|
87 |
|
89 |
if ($ldap) { |
|
|
90 |
require C4::Auth_with_ldap; |
91 |
import C4::Auth_with_ldap qw(checkpw_ldap); |
92 |
} |
93 |
if ($cas) { |
88 |
if ($cas) { |
94 |
require C4::Auth_with_cas; # no import |
89 |
require C4::Auth_with_cas; # no import |
95 |
import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth); |
90 |
import C4::Auth_with_cas qw(check_api_auth_cas checkpw_cas login_cas logout_cas login_cas_url logout_if_required multipleAuth getMultipleAuth); |
Lines 1995-2004
sub checkpw {
Link Here
|
1995 |
# 1 if auth is ok |
1990 |
# 1 if auth is ok |
1996 |
# 0 if auth is nok |
1991 |
# 0 if auth is nok |
1997 |
# -1 if user bind failed (LDAP only) |
1992 |
# -1 if user bind failed (LDAP only) |
1998 |
|
1993 |
$ldap = C4::Context->config('useldapserver') || 0; |
1999 |
if ( $ldap && defined($password) ) { |
1994 |
if ( $ldap && defined($password) ) { |
2000 |
my ( $retval, $retcard, $retuserid ); |
1995 |
my ( $retval, $retcard, $retuserid ); |
2001 |
( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1996 |
require C4::Auth_with_ldap; |
|
|
1997 |
import C4::Auth_with_ldap qw(checkpw_ldap); |
1998 |
|
1999 |
( $retval, $retcard, $retuserid, $patron ) = C4::Auth_with_ldap::checkpw_ldap(@_); # EXTERNAL AUTH |
2002 |
if ( $retval == 1 ) { |
2000 |
if ( $retval == 1 ) { |
2003 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2001 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2004 |
$passwd_ok = 1; |
2002 |
$passwd_ok = 1; |
2005 |
- |
|
|