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/900-local.yarn | |
parent | 8b037ebc76e5b8a0d429a0c365514b0c41d6022e (diff) | |
download | qvisqve-6eac3fa1cf2a0f5b418e9336c54219c30edb4222.tar.gz |
Change: get allowed scopes from user, not client, for authz code flo
Diffstat (limited to 'yarns/900-local.yarn')
-rw-r--r-- | yarns/900-local.yarn | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/yarns/900-local.yarn b/yarns/900-local.yarn index c9721bc..cae5db1 100644 --- a/yarns/900-local.yarn +++ b/yarns/900-local.yarn @@ -40,7 +40,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. IMPLEMENTS GIVEN Qvisqve configuration has user account (\S+) with password (\S+) username = get_next_match() password = get_next_match() - V['users'] = { username: password } + user = { + 'password': password, + } + users = V['users'] or {} + users[username] = {'password': password} + V['users'] = users + + IMPLEMENTS GIVEN Qvisqve configuration allows user (\S+) scopes (.+) + username = get_next_match() + scopes = get_next_match() + users = V['users'] + print('users', users) + user = users[username] + user['scopes'] = scopes.split() + users[username] = user + V['users'] = users IMPLEMENTS GIVEN Qvisqve configuration has application (\S+) with callback url (\S+) and secret (\S+) and allowed scopes (.+) app = get_next_match() |