|
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 1992-2006
sub checkpw {
Link Here
|
| 1992 |
my $passwd_ok = 0; |
1987 |
my $passwd_ok = 0; |
| 1993 |
my $patron; |
1988 |
my $patron; |
| 1994 |
|
1989 |
|
| 1995 |
|
|
|
| 1996 |
# Note: checkpw_* routines returns: |
1990 |
# Note: checkpw_* routines returns: |
| 1997 |
# 1 if auth is ok |
1991 |
# 1 if auth is ok |
| 1998 |
# 0 if auth is nok |
1992 |
# 0 if auth is nok |
| 1999 |
# -1 if user bind failed (LDAP only) |
1993 |
# -1 if user bind failed (LDAP only) |
| 2000 |
|
1994 |
$ldap = C4::Context->config('useldapserver') || 0; |
| 2001 |
if ( $ldap && defined($password) ) { |
1995 |
if ( $ldap && defined($password) ) { |
| 2002 |
my ( $retval, $retcard, $retuserid ); |
1996 |
my ( $retval, $retcard, $retuserid ); |
| 2003 |
( $retval, $retcard, $retuserid, $patron ) = checkpw_ldap(@_); # EXTERNAL AUTH |
1997 |
require C4::Auth_with_ldap; |
|
|
1998 |
import C4::Auth_with_ldap qw(checkpw_ldap); |
| 1999 |
|
| 2000 |
( $retval, $retcard, $retuserid, $patron ) = C4::Auth_with_ldap::checkpw_ldap(@_); # EXTERNAL AUTH |
| 2004 |
if ( $retval == 1 ) { |
2001 |
if ( $retval == 1 ) { |
| 2005 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
2002 |
@return = ( $retval, $retcard, $retuserid, $patron ); |
| 2006 |
$passwd_ok = 1; |
2003 |
$passwd_ok = 1; |
| 2007 |
- |
|
|