فهرست منبع

Added Comments to flow

Ben Tyger 4 سال پیش
والد
کامیت
f8ec764c4c
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      app/Controllers/Auth/AuthController.php

+ 4 - 2
app/Controllers/Auth/AuthController.php

@@ -34,18 +34,20 @@ abstract class AuthController extends Controller
             $this->logger->error('The LDAP extension is not loaded.');
             return false;
         }
-
+        // Building LDAP URI
         $ldapSchema=array_key_exists('schema', $this->config['ldap']) ?
         strtolower($this->config['ldap']['schema']) : 'ldap';
         $ldapURI="$ldapSchema://".$this->config['ldap']['host'].':'.$this->config['ldap']['port'];
+        
+        // Connecting to LDAP server
         $server = ldap_connect($ldapURI);
-
         if ($server) {
             ldap_set_option($server, LDAP_OPT_PROTOCOL_VERSION, 3);
             ldap_set_option($server, LDAP_OPT_REFERRALS, 0);
             ldap_set_option($server, LDAP_OPT_NETWORK_TIMEOUT, 10);
         }
         
+        // Authenticating LDAP service account
         $serviceAccountFQDN= (array_key_exists('service_account_dn', $this->config['ldap'])) ? 
             $this->config['ldap']['service_account_dn'] : null;
         if (is_string($serviceAccountFQDN)) {