public AuthenticationManager::authenticate(Request $request)
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 47
 
Class
- AuthenticationManager
 - Manager for authentication.
 
Namespace
Drupal\Core\Authentication
Code
public function authenticate(Request $request) {
  $provider_id = $this->getProvider($request);
  $provider = $this->authCollector->getProvider($provider_id);
  if ($provider) {
    return $provider->authenticate($request);
  }
  return NULL;
}
Please login to continue.