Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
08734cb82c
|
|||
875301b437
|
4
auth.py
4
auth.py
@ -101,9 +101,9 @@ def generateToken(**args):
|
|||||||
}
|
}
|
||||||
for claim in userEntry.claims.items():
|
for claim in userEntry.claims.items():
|
||||||
# print("DEBUG: generateToken: add claim {} -> {}".format(claim[0], claim[1]))
|
# print("DEBUG: generateToken: add claim {} -> {}".format(claim[0], claim[1]))
|
||||||
payload["x-{}".format(claim[0])] = claim[1]
|
payload[claim[0]] = claim[1]
|
||||||
|
|
||||||
return jwt.encode(payload, JWT_ISSUER)
|
return jwt.encode(payload, JWT_SECRET)
|
||||||
except NoUserException:
|
except NoUserException:
|
||||||
print("ERROR: generateToken: no user found, login or application wrong")
|
print("ERROR: generateToken: no user found, login or application wrong")
|
||||||
raise werkzeug.exceptions.Unauthorized()
|
raise werkzeug.exceptions.Unauthorized()
|
||||||
|
Reference in New Issue
Block a user