Пример #1
0
 /**
  * @test
  */
 public function itShouldAllowToSetTheAuthToken()
 {
     $someToken = 'ABCLOLOL';
     $client = new Client($this->httpClient, '', '', '');
     $client->setAuthToken($someToken);
     $this->assertEquals($someToken, $client->getAuthToken());
 }
Пример #2
0
 /**
  * @param \Buzz\Message\Response $response
  */
 private function handleResponseAuthHeader(\Buzz\Message\Response $response)
 {
     $token = $response->getHeader('Update-Client-Auth');
     if ($token) {
         $this->client->setAuthToken($token);
         $this->setTokenToCache($token);
     }
 }