<?php
namespace App\Security\User;
use Symfony\Component\HttpClient\CachingHttpClient;
use Symfony\Component\HttpClient\HttpClient;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\HttpCache\Store;
use Lexik\Bundle\JWTAuthenticationBundle\Security\Authentication\Token\PreAuthenticationJWTUserToken;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
/**
* Description of WebserviceUserProvider.
*
* @author aymane
*/
final class PublicUserProvider implements UserProviderInterface
{
/**
* {@inheritdoc}
*
* @param mixed $username
* @return PublicUser $use
*
* @throws \Exception
*/
public function loadUserByUsername($username)
{
return new PublicUser();
}
/**
* @param UserInterface $user
* @return UserInterface
*
*/
public function refreshUser(UserInterface $user)
{
return $user;
}
public function supportsClass($class): bool
{
return PublicUser::class === $class;
}
}