/** * Authenticate with Ldap * * @param array $credentials * * @return bool */ public function ldapAuthenticate($credentials) { $loginAttribute = $this->config->setPrefix('cartalyst.sentry')->get('users.login_attribute'); if (array_key_exists($loginAttribute, $credentials)) { if ($this->ldap->authenticate($credentials[$loginAttribute], $credentials['password'])) { return true; } } return false; }
/** * Constructor. * * @param Filesystem $storage * @param ConfigService $config */ public function __construct(Filesystem $storage, ConfigService $config) { $this->storage = $storage; $this->config = $config->setPrefix('core-helper'); }