AccessTokenInterface.php 676 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace EasyWeChat\Kernel\Contracts;
  11. use Psr\Http\Message\RequestInterface;
  12. /**
  13. * Interface AuthorizerAccessToken.
  14. *
  15. * @author overtrue <i@overtrue.me>
  16. */
  17. interface AccessTokenInterface
  18. {
  19. public function getToken(): array;
  20. /**
  21. * @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface
  22. */
  23. public function refresh(): self;
  24. public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface;
  25. }