summaryrefslogtreecommitdiff
path: root/create-token
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-07-13 15:35:16 +0300
committerLars Wirzenius <liw@liw.fi>2017-07-13 15:35:16 +0300
commitbebfe51fc400444fab5670620d1e35fb4408e96b (patch)
tree3b47856d7f135b18db0cac141a52c3a6035ccaa2 /create-token
parente607b5d8ea849c0c8349c779470fd7ee0a3d4e6c (diff)
downloadqvisqve-bebfe51fc400444fab5670620d1e35fb4408e96b.tar.gz
Add: let caller set "iss" claims
Diffstat (limited to 'create-token')
-rwxr-xr-xcreate-token7
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,