vendor/hwi/oauth-bundle/src/Security/Http/Firewall/RefreshAccessTokenListener.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 HWI\Bundle\OAuthBundle\Security\Http\Authenticator\OAuthAuthenticator;
  13. class RefreshAccessTokenListener extends AbstractRefreshAccessTokenListener
  14. {
  15. private OAuthAuthenticator $oAuthAuthenticator;
  16. public function __construct(
  17. OAuthAuthenticator $oAuthAuthenticator
  18. ) {
  19. $this->oAuthAuthenticator = $oAuthAuthenticator;
  20. }
  21. /**
  22. * @template T of OAuthToken
  23. *
  24. * @param T $token
  25. *
  26. * @return T
  27. */
  28. protected function refreshToken(OAuthToken $token): OAuthToken
  29. {
  30. return $this->oAuthAuthenticator->refreshToken($token);
  31. }
  32. }