AccessTokenInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * 重庆赤晓店信息科技有限公司
  4. * https://www.chixiaodian.com
  5. * Copyright (c) 2023 赤店商城 All rights reserved.
  6. */
  7. /*
  8. * This file is part of the overtrue/wechat.
  9. *
  10. * (c) overtrue <i@overtrue.me>
  11. *
  12. * This source file is subject to the MIT license that is bundled
  13. * with this source code in the file LICENSE.
  14. */
  15. namespace ByteDance\Kernel\Contracts;
  16. use Psr\Http\Message\RequestInterface;
  17. /**
  18. * Interface AuthorizerAccessToken.
  19. *
  20. * @author overtrue <i@overtrue.me>
  21. */
  22. interface AccessTokenInterface
  23. {
  24. /**
  25. * @return array
  26. */
  27. public function getToken(): array;
  28. /**
  29. * @return \ByteDance\Kernel\Contracts\AccessTokenInterface
  30. */
  31. public function refresh(): self;
  32. /**
  33. * @param \Psr\Http\Message\RequestInterface $request
  34. * @param array $requestOptions
  35. *
  36. * @return \Psr\Http\Message\RequestInterface
  37. */
  38. public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface;
  39. }