VirtualBearerTokenCredential.php 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace AlibabaCloud\Client\Tests\Unit\Credentials\Ini;
  3. /**
  4. * Class VirtualBearerTokenCredential
  5. *
  6. * @codeCoverageIgnore
  7. *
  8. * @package AlibabaCloud\Client\Tests\Unit\Credentials\Ini
  9. */
  10. class VirtualBearerTokenCredential extends VirtualAccessKeyCredential
  11. {
  12. /**
  13. * @return string
  14. */
  15. public static function noToken()
  16. {
  17. $content = <<<EOT
  18. [phpunit]
  19. enable = true
  20. type = bearer_token
  21. EOT;
  22. return (new static($content))->url();
  23. }
  24. /**
  25. * @return string
  26. */
  27. public static function client()
  28. {
  29. $content = <<<EOT
  30. [phpunit]
  31. enable = true
  32. type = bearer_token
  33. bearer_token = bearer_token
  34. region_id = cn-hangzhou
  35. debug = true
  36. delay = 3.2
  37. timeout = 3.2
  38. connect_timeout = 3.2
  39. cert_file = /path/server.pem
  40. cert_password = password
  41. proxy = tcp://localhost:8125
  42. proxy_http = tcp://localhost:8125
  43. proxy_https = tcp://localhost:9124
  44. proxy_no = .mit.edu,foo.com
  45. EOT;
  46. return (new static($content))->url();
  47. }
  48. }