diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php index c4c1df4..822f020 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php @@ -171,18 +171,9 @@ protected function filterProviders(array $providers, Request $request) { $allowed_providers = array(); if ($route && $route->hasOption('_auth')) { $allowed_providers = $route->getOption('_auth'); + $providers = array_intersect_key($providers, array_flip($allowed_providers)); } - elseif ($default_provider = $this->defaultProviderId()) { - // @todo Mirrors the defective behavior of AuthenticationEnhancer and - // restricts the list of allowed providers to the default provider if no - // _auth was specified on the current route. - // - // This restriction will be removed by https://www.drupal.org/node/2286971 - // See also https://www.drupal.org/node/2283637 - $allowed_providers = array($default_provider); - } - - return array_intersect_key($providers, array_flip($allowed_providers)); + return $providers; } /**