diff --git a/core/authorize.php b/core/authorize.php index 7510277..cc25f87 100644 --- a/core/authorize.php +++ b/core/authorize.php @@ -56,9 +56,9 @@ function authorize_access_allowed(Request $request) { $account = \Drupal::service('authentication')->authenticate($request); if ($account) { - \Drupal::service('current_user')->setAccount($account); + \Drupal::currentUser()->setAccount($account); } - return Settings::get('allow_authorize_operations', TRUE) && \Drupal::service('current_user')->hasPermission('administer software updates'); + return Settings::get('allow_authorize_operations', TRUE) && \Drupal::currentUser()->hasPermission('administer software updates'); } try { diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php index 3d793f7..492b6de 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationManager.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationManager.php @@ -8,9 +8,7 @@ namespace Drupal\Core\Authentication; use Drupal\Core\Routing\RouteMatch; -use Drupal\Core\Session\AnonymousUserSession; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; /** * Manager for authentication. diff --git a/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php b/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php index 49d7655..38536e1 100644 --- a/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php +++ b/core/lib/Drupal/Core/Authentication/AuthenticationProviderInterface.php @@ -8,7 +8,6 @@ namespace Drupal\Core\Authentication; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; /** * Interface for authentication providers. diff --git a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php index 103dad3..5a84583 100644 --- a/core/lib/Drupal/Core/Authentication/Provider/Cookie.php +++ b/core/lib/Drupal/Core/Authentication/Provider/Cookie.php @@ -9,9 +9,7 @@ use Drupal\Core\Authentication\AuthenticationProviderInterface; use Drupal\Core\Session\SessionConfigurationInterface; -use Drupal\Core\Session\SessionManagerInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; /** * Cookie based authentication provider. @@ -55,10 +53,4 @@ public function authenticate(Request $request) { return NULL; } - /** - * {@inheritdoc} - */ - public function handleException(GetResponseForExceptionEvent $event) { - return FALSE; - } } diff --git a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php index 3619e2b..c3e11a6 100644 --- a/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php @@ -42,7 +42,7 @@ class AuthenticationSubscriber implements EventSubscriberInterface { /** * Authentication challenge provider. * - * @var \Drupal\Core\Authentication\AuthenticationChallengeProviderInterface|NULL + * @var \Drupal\Core\Authentication\AuthenticationProviderChallengeInterface|NULL */ protected $challengeProvider; diff --git a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php index 35a338d..d096531 100644 --- a/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php +++ b/core/lib/Drupal/Core/EventSubscriber/SpecialAttributesRouteSubscriber.php @@ -7,7 +7,6 @@ namespace Drupal\Core\EventSubscriber; -use Drupal\Component\Utility\String; use Drupal\Core\Routing\RouteBuildEvent; use Drupal\Core\Routing\RouteSubscriberBase; use Symfony\Cmf\Component\Routing\RouteObjectInterface; diff --git a/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php b/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php index 660d44c..c2b8483 100644 --- a/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php +++ b/core/modules/basic_auth/src/Authentication/Provider/BasicAuth.php @@ -13,11 +13,9 @@ use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Flood\FloodInterface; -use Drupal\Core\Routing\RouteMatch; use Drupal\user\UserAuthInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; -use Symfony\Component\Routing\Route; /** * HTTP Basic authentication provider. diff --git a/core/modules/locale/tests/modules/early_translation_test/src/Auth.php b/core/modules/locale/tests/modules/early_translation_test/src/Auth.php index 5388d5d..12da491 100644 --- a/core/modules/locale/tests/modules/early_translation_test/src/Auth.php +++ b/core/modules/locale/tests/modules/early_translation_test/src/Auth.php @@ -10,7 +10,6 @@ use Drupal\Core\Authentication\AuthenticationProviderInterface; use Drupal\Core\Entity\EntityManagerInterface; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; /** * Test authentication provider. @@ -53,11 +52,4 @@ public function authenticate(Request $request) { return NULL; } - /** - * {@inheritdoc} - */ - public function handleException(GetResponseForExceptionEvent $event) { - return FALSE; - } - }