示例#1
0
文件: Token.php 项目: keika299/chap
 /**
  * Generate token.
  *
  * @return string
  * @throws \Exception
  */
 private function generateToken()
 {
     $username = $this->client->getUsername();
     $password = $this->client->getUserPassword();
     if ($username === null || $password === null) {
         throw new \Exception('Cannot refresh token.');
     }
     return $this->client->identityService()->getToken()->access->token->id;
 }
示例#2
0
 public function testGetPassword()
 {
     $this->assertEquals('paSSword123456#$%', $this->client->getUserPassword());
 }