1 | <?php |
||
15 | class Auth implements ClientInterface |
||
16 | { |
||
17 | |||
18 | /** @var Cache */ |
||
19 | protected $cache; |
||
20 | |||
21 | /** @var ClientInterface */ |
||
22 | protected $client; |
||
23 | |||
24 | /** @var string */ |
||
25 | protected $token; |
||
26 | |||
27 | /** @var string */ |
||
28 | protected $username; |
||
29 | |||
30 | /** @var string */ |
||
31 | protected $password; |
||
32 | |||
33 | protected $authStrategy; |
||
34 | |||
35 | public function __construct( |
||
47 | |||
48 | /** |
||
49 | * @param string $method |
||
50 | * @param string|UriInterface $uri |
||
51 | * @param array $options |
||
52 | * |
||
53 | * @return mixed|\Psr\Http\Message\ResponseInterface |
||
54 | * @throws \Exception |
||
55 | */ |
||
56 | public function request($method, $uri, array $options = []) |
||
82 | |||
83 | /** |
||
84 | * @inheritDoc |
||
85 | */ |
||
86 | public function send(RequestInterface $request, array $options = []) |
||
90 | |||
91 | /** |
||
92 | * @inheritDoc |
||
93 | */ |
||
94 | public function sendAsync(RequestInterface $request, array $options = []) |
||
98 | |||
99 | /** |
||
100 | * @inheritDoc |
||
101 | */ |
||
102 | public function requestAsync($method, $uri, array $options = []) |
||
106 | |||
107 | /** |
||
108 | * @inheritDoc |
||
109 | */ |
||
110 | public function getConfig($option = null) |
||
114 | |||
115 | protected function needToRevalidate(ResponseInterface $response): bool |
||
123 | } |
||
124 |