diff options
Diffstat (limited to 'qvisqve/token.py')
-rw-r--r-- | qvisqve/token.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qvisqve/token.py b/qvisqve/token.py index 3b343c2..edc62fd 100644 --- a/qvisqve/token.py +++ b/qvisqve/token.py @@ -50,7 +50,7 @@ class TokenGenerator: 'info', msg_text='Set signing key', key=self._key, orig_key=key, imported_key=imported_key) - def new_token(self, audience, scope): + def new_token(self, audience, scope, subject_id=None): assert self._issuer is not None assert self._lifetime is not None assert self._key is not None @@ -58,7 +58,7 @@ class TokenGenerator: now = time.time() claims = { 'iss': self._issuer, - 'sub': '', + 'sub': subject_id or '', 'aud': audience, 'exp': now + self._lifetime, 'scope': scope, |