You are here

private function LoginValidator::additionalDebuggingResponse in Lightweight Directory Access Protocol (LDAP) 8.3

Provides formatting for authentication failures.

Return value

string Response text.

2 calls to LoginValidator::additionalDebuggingResponse()
LoginValidator::testCredentials in ldap_authentication/src/Controller/LoginValidator.php
Credentials are tested.
LoginValidator::testSsoCredentials in ldap_authentication/src/Controller/LoginValidator.php
Test the SSO credentials.

File

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

Class

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

Namespace

Drupal\ldap_authentication\Controller

Code

private function additionalDebuggingResponse($authenticationResult) {
  $information = '';
  switch ($authenticationResult) {
    case self::AUTHENTICATION_FAILURE_FIND:
      $information = $this
        ->t('(not found)');
      break;
    case self::AUTHENTICATION_FAILURE_CREDENTIALS:
      $information = $this
        ->t('(wrong credentials)');
      break;
    case self::AUTHENTICATION_FAILURE_GENERIC:
      $information = $this
        ->t('(generic)');
      break;
  }
  return $information;
}