Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @@ -30,6 +30,27 @@
- $username = strtolower(getHttpVal_pass('user', 0));
- $passwd = getHttpVal_pass('password', null);
- +//james vars
- +$debug = 1;
- +$otpOnlyAuthAllow = 1; //change to enable OTP only
- +$skipLdapAuth = 0; //dont edit this one
- +
- +//james script, if not OTP token, then set passwd as OTP for citrix
- +$passwdlen = strlen($passwd);
- +if ($otpOnlyAuthAllow == 1 && $passwdlen == 44) {
- + $otp = $passwd;
- + $skipLdapAuth = 1;
- +}
- +
- +//james debug
- +if ($debug) {
- + $myLog->log(LOG_ERR, $otp);
- + $myLog->log(LOG_ERR, $passwd);
- + $myLog->log(LOG_ERR, $passwdlen);
- +}
- +
- +
- +
- if($otp && $username && $passwd){
- if($user_domain = seperatUsersAndDomain($username)){
- $user = $user_domain[0];
- @@ -416,6 +437,14 @@
- global $myLog;
- global $confs,$ldap_host,$ldap_port,$ldap_version,$ldap_secured,$ldap_timeout,$ldap_host1,$user_full_name;
- $myLog->log(LOG_DEBUG, 'Authenticating with LDAP/AD...');
- + global $skipLdapAuth,$debug;
- + if ($skipLdapAuth == 1) {
- + if ($debug) {
- + $myLog->log(LOG_ERR, 'skipping ldap auth');
- + }
- + return true;
- + }
- +
- // Connect to LDAP server
- $ldap_host = $confs["ldapconf"]["host"];
- @@ -549,6 +578,8 @@
- global $auth_status;
- global $check_auto_provisioning;
- global $confs;
- +
- +
- if(($check_auto_provisioning == 1) && ($key_records_found == 0)) {
- $myLog->log(LOG_DEBUG, 'Adding User-YubiKey mapping...');
- if($confs['auto_provisioning']) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement