Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. AuthenticationProviderChallengeInterface.php

interface 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\Authentication
View 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

Title Sort descending Modifiers Object type Summary Overrides
AuthenticationProviderChallengeInterface::challengeException public function Constructs an exception which is used to generate the challenge. 2

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal