function TestAuthenticationProvider::authenticate

Same name and namespace in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php \Drupal\Tests\Core\Authentication\TestAuthenticationProvider::authenticate()
  2. 10 core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php \Drupal\Tests\Core\Authentication\TestAuthenticationProvider::authenticate()
  3. 11.x core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php \Drupal\Tests\Core\Authentication\TestAuthenticationProvider::authenticate()

Authenticates the user.

Parameters

\Symfony\Component\HttpFoundation\Request|null $request: The request object.

Return value

\Drupal\Core\Session\AccountInterface|null AccountInterface - in case of a successful authentication. NULL - in case where authentication failed.

Overrides AuthenticationProviderInterface::authenticate

File

core/tests/Drupal/Tests/Core/Authentication/AuthenticationCollectorTest.php, line 88

Class

TestAuthenticationProvider
A simple provider for unit testing AuthenticationCollector.

Namespace

Drupal\Tests\Core\Authentication

Code

public function authenticate(Request $request) {
    return NULL;
}

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