public function Cookie::authenticate in Drupal 8
Same name and namespace in other branches
- 9 core/modules/user/src/Authentication/Provider/Cookie.php \Drupal\user\Authentication\Provider\Cookie::authenticate()
- 10 core/modules/user/src/Authentication/Provider/Cookie.php \Drupal\user\Authentication\Provider\Cookie::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/ user/ src/ Authentication/ Provider/ Cookie.php, line 55
Class
- Cookie
- Cookie based authentication provider.
Namespace
Drupal\user\Authentication\ProviderCode
public function authenticate(Request $request) {
return $this
->getUserFromSession($request
->getSession());
}