interface AuthenticationProviderChallengeInterface in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Authentication/AuthenticationProviderChallengeInterface.php \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface
- 10 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
- interface \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface
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 - BasicAuth.php in core/
modules/ basic_auth/ src/ Authentication/ Provider/ BasicAuth.php
File
- core/
lib/ Drupal/ Core/ Authentication/ AuthenticationProviderChallengeInterface.php, line 14
Namespace
Drupal\Core\AuthenticationView source
interface AuthenticationProviderChallengeInterface {
/**
* Constructs an exception which is used to generate the challenge.
*
* @param \Symfony\Component\HttpFoundation\Request $request
* The request.
* @param \Exception $previous
* 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AuthenticationProviderChallengeInterface:: |
public | function | Constructs an exception which is used to generate the challenge. | 2 |