diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-11-05 09:56:36 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-11-05 09:56:36 +0200 |
commit | df351c2661cd838e1b7de521f1fcd4f84acdf4a0 (patch) | |
tree | 5ebbab360420bcd299d53ddd330b654fc67837e4 /qvisqve/authn_entity_manager.py | |
parent | 5a74ba9553fd21465e04dd4ace7007e2f865d7f1 (diff) | |
download | qvisqve-df351c2661cd838e1b7de521f1fcd4f84acdf4a0.tar.gz |
Add: sub fields to clients, tokens created by client-cred grant
Diffstat (limited to 'qvisqve/authn_entity_manager.py')
-rw-r--r-- | qvisqve/authn_entity_manager.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qvisqve/authn_entity_manager.py b/qvisqve/authn_entity_manager.py index f84634c..e3d454a 100644 --- a/qvisqve/authn_entity_manager.py +++ b/qvisqve/authn_entity_manager.py @@ -71,6 +71,15 @@ class ClientManager(AuthenticatingEntityManager): def __init__(self, rs): super().__init__(rs, 'client') + def get_subject(self, username): + user = self.get(username) + return user.get('sub') + + def set_subject(self, username, sub): + user = self.get(username) + user['sub'] = sub + self.create(username, user) + class UserManager(AuthenticatingEntityManager): |