From 9e93a24658815dd7d600408e7ae4faf33330951a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 15 Mar 2022 09:40:38 -0500 Subject: [PATCH] Revert "Update AuthenticateSession.php (#41447)" This reverts commit a7b21b84732e8d1139003d30f72a5cc20a2f726d. --- src/Illuminate/Session/Middleware/AuthenticateSession.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Session/Middleware/AuthenticateSession.php b/src/Illuminate/Session/Middleware/AuthenticateSession.php index 8a517b5ff447..1b3cee37ccb6 100644 --- a/src/Illuminate/Session/Middleware/AuthenticateSession.php +++ b/src/Illuminate/Session/Middleware/AuthenticateSession.php @@ -48,11 +48,11 @@ public function handle($request, Closure $next) } } - if (! $request->session()->has('password_hash_'.$this->guard()->getDefaultDriver())) { + if (! $request->session()->has('password_hash_'.$this->auth->getDefaultDriver())) { $this->storePasswordHashInSession($request); } - if ($request->session()->get('password_hash_'.$this->guard()->getDefaultDriver()) !== $request->user()->getAuthPassword()) { + if ($request->session()->get('password_hash_'.$this->auth->getDefaultDriver()) !== $request->user()->getAuthPassword()) { $this->logout($request); } @@ -76,7 +76,7 @@ protected function storePasswordHashInSession($request) } $request->session()->put([ - 'password_hash_'.$this->guard()->getDefaultDriver() => $request->user()->getAuthPassword(), + 'password_hash_'.$this->auth->getDefaultDriver() => $request->user()->getAuthPassword(), ]); } @@ -94,7 +94,7 @@ protected function logout($request) $request->session()->flush(); - throw new AuthenticationException('Unauthenticated.', [$this->guard()->getDefaultDriver()]); + throw new AuthenticationException('Unauthenticated.', [$this->auth->getDefaultDriver()]); } /**