vendor/hwi/oauth-bundle/src/Security/Http/Firewall/RefreshAccessTokenListenerOld.php line 17

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of the HWIOAuthBundle package.
  4. *
  5. * (c) Hardware Info <opensource@hardware.info>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace HWI\Bundle\OAuthBundle\Security\Http\Firewall;
  11. use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken;
  12. use Symfony\Component\Security\Core\Authentication\Provider\AuthenticationProviderInterface;
  13. class RefreshAccessTokenListenerOld extends RefreshAccessTokenListener
  14. {
  15. /**
  16. * @phpstan-ignore-next-line
  17. */
  18. private AuthenticationProviderInterface $oAuthProvider;
  19. public function __construct(
  20. /* @phpstan-ignore-next-line */
  21. AuthenticationProviderInterface $oAuthProvider
  22. ) {
  23. $this->oAuthProvider = $oAuthProvider;
  24. }
  25. /**
  26. * @template T of OAuthToken
  27. *
  28. * @param T $token
  29. *
  30. * @return T
  31. */
  32. protected function refreshToken(OAuthToken $token): OAuthToken
  33. {
  34. // @phpstan-ignore-next-line returns TokenInterface instead of OAuthToken
  35. return $this->oAuthProvider->authenticate($token);
  36. }
  37. }