diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-16 14:51:03 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-16 14:51:03 +0300 |
commit | 6eac3fa1cf2a0f5b418e9336c54219c30edb4222 (patch) | |
tree | 6e1e445ff420be316a6db91c01a8ec009aba6dac /yarns/lib.py | |
parent | 8b037ebc76e5b8a0d429a0c365514b0c41d6022e (diff) | |
download | qvisqve-6eac3fa1cf2a0f5b418e9336c54219c30edb4222.tar.gz |
Change: get allowed scopes from user, not client, for authz code flo
Diffstat (limited to 'yarns/lib.py')
-rw-r--r-- | yarns/lib.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/yarns/lib.py b/yarns/lib.py index 96c93ad..a9ba526 100644 --- a/yarns/lib.py +++ b/yarns/lib.py @@ -205,11 +205,14 @@ def start_qvisqve(): with open(filename, 'w') as f: yaml.safe_dump(spec, stream=f) - users = V['users'] - for name in users or []: + users = V['users'] or {} + print('users:', users) + for name, user in users.items(): + print('add user', name, user) filename = os.path.join(store, 'user', name) spec = { - 'hashed_secret': sh.hash(users[name]), + 'hashed_secret': sh.hash(user['password']), + 'allowed_scopes': user['scopes'], } with open(filename, 'w') as f: yaml.safe_dump(spec, stream=f) |