You are here

public function LoginValidator::validateLogin in Lightweight Directory Access Protocol (LDAP) 8.3

Starts login process.

Parameters

\Drupal\Core\Form\FormStateInterface $formState: The form state.

Return value

\Drupal\Core\Form\FormStateInterface The form state.

File

ldap_authentication/src/Controller/LoginValidator.php, line 91

Class

LoginValidator
Handles the actual testing of credentials and authentication of users.

Namespace

Drupal\ldap_authentication\Controller

Code

public function validateLogin(FormStateInterface $formState) {
  $this->authName = trim($formState
    ->getValue('name'));
  $this->formState = $formState;
  $this->detailLog
    ->log('%auth_name : Beginning authentication', [
    '%auth_name' => $this->authName,
  ], 'ldap_authentication');
  $this
    ->processLogin();
  return $this->formState;
}