api->postTokenWithApiKey(); $response = $this->execute($definition, array_intersect_key($options, $definition['params'])); $token = $this->model(Token::class, $response); $serviceUrl = $this->model(Catalog::class, $response)->getServiceUrl( $options['catalogName'], $options['catalogType'], $options['region'], $options['urlType'] ); return [$token, $serviceUrl]; } /** * Generates a new authentication token. * * @param array $options {@see \OpenStack\Identity\v2\Api::postToken} * * @return Token */ public function generateToken(array $options = []): Token { $response = $this->execute($this->api->postTokenWithApiKey(), $options); return $this->model(Token::class, $response); } }