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

Breadcrumb

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

interface AuthenticationProviderInterface

Interface for authentication providers.

Hierarchy

  • interface \Drupal\Core\Authentication\AuthenticationProviderInterface

Expanded class hierarchy of AuthenticationProviderInterface

All classes that implement AuthenticationProviderInterface

3 files declare their use of AuthenticationProviderInterface
AuthenticationSubscriber.php in core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php
BasicAuth.php in core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
Cookie.php in core/modules/user/src/Authentication/Provider/Cookie.php

File

core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php, line 10

Namespace

Drupal\Core\Authentication
View source
interface AuthenticationProviderInterface {
    
    /**
     * Checks whether suitable authentication credentials are on the request.
     *
     * @param \Symfony\Component\HttpFoundation\Request $request
     *   The request object.
     *
     * @return bool
     *   TRUE if authentication credentials suitable for this provider are on the
     *   request, FALSE otherwise.
     */
    public function applies(Request $request);
    
    /**
     * Authenticates the user.
     *
     * @param \Symfony\Component\HttpFoundation\Request|null $request
     *   The request object.
     *
     * @return \Drupal\Core\Session\AccountInterface|null
     *   AccountInterface - in case of a successful authentication.
     *   NULL - in case where authentication failed.
     */
    public function authenticate(Request $request);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
AuthenticationProviderInterface::applies public function Checks whether suitable authentication credentials are on the request. 3
AuthenticationProviderInterface::authenticate public function Authenticates the user. 3

API Navigation

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