diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-07-13 15:35:16 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-07-13 15:35:16 +0300 |
commit | bebfe51fc400444fab5670620d1e35fb4408e96b (patch) | |
tree | 3b47856d7f135b18db0cac141a52c3a6035ccaa2 /create-token | |
parent | e607b5d8ea849c0c8349c779470fd7ee0a3d4e6c (diff) | |
download | qvisqve-bebfe51fc400444fab5670620d1e35fb4408e96b.tar.gz |
Add: let caller set "iss" claims
Diffstat (limited to 'create-token')
-rwxr-xr-x | create-token | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/create-token b/create-token index c2f2785..c0e43a6 100755 --- a/create-token +++ b/create-token @@ -24,15 +24,16 @@ import apifw filename = sys.argv[1] -aud = sys.argv[2] -scopes = sys.argv[3] +iss = sys.argv[2] +aud = sys.argv[3] +scopes = sys.argv[4] key_text = open(filename, 'r').read() key = Crypto.PublicKey.RSA.importKey(key_text) now = time.time() claims = { - 'iss': 'https://idp.example.com', + 'iss': iss, 'sub': 'subject-uuid', 'aud': aud, 'exp': now + 3600, |