Skip to content

Commit

Permalink
Revert "Update AuthenticateSession.php (#41447)" (#41491)
Browse files Browse the repository at this point in the history
This reverts commit a7b21b8.
  • Loading branch information
taylorotwell committed Mar 15, 2022
1 parent 2748457 commit b1f949e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Illuminate/Session/Middleware/AuthenticateSession.php
Expand Up @@ -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);
}

Expand All @@ -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(),
]);
}

Expand All @@ -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()]);
}

/**
Expand Down

0 comments on commit b1f949e

Please sign in to comment.