public function AuthenticationManager::authenticate in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Authentication/AuthenticationManager.php \Drupal\Core\Authentication\AuthenticationManager::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/
lib/ Drupal/ Core/ Authentication/ AuthenticationManager.php, line 52 - Contains \Drupal\Core\Authentication\AuthenticationManager.
Class
- AuthenticationManager
- Manager for authentication.
Namespace
Drupal\Core\AuthenticationCode
public function authenticate(Request $request) {
$provider_id = $this
->getProvider($request);
$provider = $this->authCollector
->getProvider($provider_id);
if ($provider) {
return $provider
->authenticate($request);
}
return NULL;
}