diff --git a/src/Illuminate/Session/Middleware/AuthenticateSession.php b/src/Illuminate/Session/Middleware/AuthenticateSession.php index 1b3cee37ccb6..8a517b5ff447 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->auth->getDefaultDriver())) { + if (! $request->session()->has('password_hash_'.$this->guard()->getDefaultDriver())) { $this->storePasswordHashInSession($request); } - if ($request->session()->get('password_hash_'.$this->auth->getDefaultDriver()) !== $request->user()->getAuthPassword()) { + if ($request->session()->get('password_hash_'.$this->guard()->getDefaultDriver()) !== $request->user()->getAuthPassword()) { $this->logout($request); } @@ -76,7 +76,7 @@ protected function storePasswordHashInSession($request) } $request->session()->put([ - 'password_hash_'.$this->auth->getDefaultDriver() => $request->user()->getAuthPassword(), + 'password_hash_'.$this->guard()->getDefaultDriver() => $request->user()->getAuthPassword(), ]); } @@ -94,7 +94,7 @@ protected function logout($request) $request->session()->flush(); - throw new AuthenticationException('Unauthenticated.', [$this->auth->getDefaultDriver()]); + throw new AuthenticationException('Unauthenticated.', [$this->guard()->getDefaultDriver()]); } /**