Implement changes to administrative user revocation, closes #733
This commit is contained in:
parent
20beb2f280
commit
975597b4d0
19 changed files with 458 additions and 125 deletions
|
@ -107,7 +107,13 @@ class ServerRepository extends BaseRepository implements ServerRepositoryInterfa
|
|||
*/
|
||||
public function revokeAccessKey($key)
|
||||
{
|
||||
Assert::stringNotEmpty($key, 'First argument passed to revokeAccessKey must be a non-empty string, received %s.');
|
||||
if (is_array($key)) {
|
||||
return $this->getHttpClient()->request('POST', 'keys', [
|
||||
'json' => $key,
|
||||
]);
|
||||
}
|
||||
|
||||
Assert::stringNotEmpty($key, 'First argument passed to revokeAccessKey must be a non-empty string or array, received %s.');
|
||||
|
||||
return $this->getHttpClient()->request('DELETE', 'keys/' . $key);
|
||||
}
|
||||
|
|
Reference in a new issue