feat: Run API call as another user

This commit is contained in:
Michael Gerdemann
2020-01-19 12:40:08 +01:00
parent eeb2655889
commit d527b06af7
2 changed files with 17 additions and 0 deletions

View File

@ -88,6 +88,16 @@ class Client
return $this->httpClient->request($method, $uri, $options);
}
/**
* @param string $username
* @return $this
*/
public function sudo(string $username): self
{
$this->config['query']['sudo'] = $username;
return $this;
}
/**
* @param array $authentication
* @throws Exception