function AuthenticationManager::authenticate

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Authentication/AuthenticationManager.php \Drupal\Core\Authentication\AuthenticationManager::authenticate()
  2. 10 core/lib/Drupal/Core/Authentication/AuthenticationManager.php \Drupal\Core\Authentication\AuthenticationManager::authenticate()
  3. 11.x core/lib/Drupal/Core/Authentication/AuthenticationManager.php \Drupal\Core\Authentication\AuthenticationManager::authenticate()

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;
}

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