You are here

interface AuthenticationProviderChallengeInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface

Generate a challenge when access is denied for unauthenticated users.

On a 403 (access denied), if there are no credentials on the request, some authentication methods (e.g. basic auth) require that a challenge is sent to the client.

Hierarchy

Expanded class hierarchy of AuthenticationProviderChallengeInterface

All classes that implement AuthenticationProviderChallengeInterface

2 files declare their use of AuthenticationProviderChallengeInterface
AuthenticationSubscriber.php in core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
Contains \Drupal\Core\EventSubscriber\AuthenticationSubscriber.
BasicAuth.php in core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
Contains \Drupal\basic_auth\Authentication\Provider\BasicAuth.

File

core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php, line 19
Contains \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface.

Namespace

Drupal\Core\Authentication
View source
interface AuthenticationProviderChallengeInterface {

  /**
   * Constructs an exception which is used to generate the challenge.
   *
   * @var \Symfony\Component\HttpFoundation\Request
   *   The request.
   * @var \Exception $exception
   *   The previous exception.
   *
   * @return \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface|NULL
   *   An exception to be used in order to generate an authentication challenge.
   */
  public function challengeException(Request $request, \Exception $previous);

}

Members

Namesort descending Modifiers Type Description Overrides
AuthenticationProviderChallengeInterface::challengeException public function Constructs an exception which is used to generate the challenge. 2