summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2019-01-25 10:26:35 +0200
committerLars Wirzenius <liw@liw.fi>2019-01-25 10:26:35 +0200
commitdf1fe2d658df617106249a2fde6766a7f929df51 (patch)
treed75a6f3bcad45183108d268fe1f120987e82051c
parent0d080c7f5f1913de98396588cfa66438b6a6c08a (diff)
downloadeffitool-df1fe2d658df617106249a2fde6766a7f929df51.tar.gz
Fix: add allowed_scopes to new admin clients
-rwxr-xr-xeffitool5
1 files changed, 3 insertions, 2 deletions
diff --git a/effitool b/effitool
index 97cf205..f3897cd 100755
--- a/effitool
+++ b/effitool
@@ -225,14 +225,15 @@ class Tool:
new_client = {
'id': args['client_id'],
+ 'allowed_scopes': ADMIN_SCOPES,
}
+ client_path = '/clients/{}'.format(new_client['id'])
api.post_json(token, '/clients', new_client)
new_secret = {
'secret': args['client_secret'],
}
- api.put_json(
- token, '/clients/{}/secret'.format(new_client['id']), new_secret)
+ api.put_json(token, '{}/secret'.format(client_path), new_secret)
print('Created new admin client', new_client['id'])