You are here

public function AuthenticationManager::challengeException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Authentication/AuthenticationManager.php \Drupal\Core\Authentication\AuthenticationManager::challengeException()

Constructs an exception which is used to generate the challenge.

The request. @var \Exception $exception The previous exception.

Return value

\Symfony\Component\HttpKernel\Exception\HttpExceptionInterface|NULL An exception to be used in order to generate an authentication challenge.

Overrides AuthenticationProviderChallengeInterface::challengeException

File

core/lib/Drupal/Core/Authentication/AuthenticationManager.php, line 87
Contains \Drupal\Core\Authentication\AuthenticationManager.

Class

AuthenticationManager
Manager for authentication.

Namespace

Drupal\Core\Authentication

Code

public function challengeException(Request $request, \Exception $previous) {
  $provider_id = $this
    ->getChallenger($request);
  if ($provider_id) {
    $provider = $this->authCollector
      ->getProvider($provider_id);
    return $provider
      ->challengeException($request, $previous);
  }
}