interface UserAuthInterface

Same name in other branches
  1. 9 core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface
  2. 8.9.x core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface
  3. 10 core/modules/user/src/UserAuthInterface.php \Drupal\user\UserAuthInterface

An interface for validating user authentication credentials.

Hierarchy

Expanded class hierarchy of UserAuthInterface

All classes that implement UserAuthInterface

4 files declare their use of UserAuthInterface
BasicAuth.php in core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php
UserAuthDecorator.php in core/modules/user/tests/modules/user_auth_decorator_test/src/UserAuthDecorator.php
UserAuthenticationController.php in core/modules/user/src/Controller/UserAuthenticationController.php
UserLoginForm.php in core/modules/user/src/Form/UserLoginForm.php

File

core/modules/user/src/UserAuthInterface.php, line 8

Namespace

Drupal\user
View source
interface UserAuthInterface {
    
    /**
     * Validates user authentication credentials.
     *
     * @param string $username
     *   The user name to authenticate.
     * @param string $password
     *   A plain-text password, such as trimmed text from form values.
     *
     * @return int|bool
     *   The user's uid on success, or FALSE on failure to authenticate.
     */
    public function authenticate($username, $password);

}

Members

Title Sort descending Modifiers Object type Summary
UserAuthInterface::authenticate public function Validates user authentication credentials.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.