diff --git a/Security/Authenticator/JWTAuthenticator.php b/Security/Authenticator/JWTAuthenticator.php index 7021fc14..74619f8b 100644 --- a/Security/Authenticator/JWTAuthenticator.php +++ b/Security/Authenticator/JWTAuthenticator.php @@ -189,7 +189,7 @@ protected function loadUser(array $payload, string $identity): UserInterface } } - if(!class_exists(UsernameNotFoundException::class)) { + if(!class_exists(UserNotFoundException::class)) { $ex = new UsernameNotFoundException(sprintf('There is no user with username "%s".', $identity)); $ex->setUsername($identity); } else {