Skip to content

Commit

Permalink
Add exception if user does not exists (#222)
Browse files Browse the repository at this point in the history
  • Loading branch information
RazaChohan authored Jan 4, 2021
1 parent 1a6c512 commit cad32f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Security/Authenticator/RefreshTokenAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ public function getUser($credentials, UserProviderInterface $userProvider)

$user = $userProvider->loadUserByUsername($username);

if (null === $user) {
throw new AuthenticationException(sprintf('User with refresh token "%s" does not exist.', $refreshToken));
}

$this->userChecker->checkPreAuth($user);
$this->userChecker->checkPostAuth($user);

Expand Down

0 comments on commit cad32f4

Please sign in to comment.