You are here

public function TestAuth::authenticate in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth::authenticate()
  2. 10 core/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php \Drupal\rest_test\Authentication\Provider\TestAuth::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/modules/rest/tests/modules/rest_test/src/Authentication/Provider/TestAuth.php, line 23

Class

TestAuth
Authentication provider for testing purposes.

Namespace

Drupal\rest_test\Authentication\Provider

Code

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