Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
08734cb82c
|
|||
875301b437
|
|||
da06065959
|
4
auth.py
4
auth.py
@ -101,9 +101,9 @@ def generateToken(**args):
|
||||
}
|
||||
for claim in userEntry.claims.items():
|
||||
# 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:
|
||||
print("ERROR: generateToken: no user found, login or application wrong")
|
||||
raise werkzeug.exceptions.Unauthorized()
|
||||
|
@ -3,7 +3,7 @@ from flask_cors import CORS
|
||||
|
||||
# instantiate the webservice
|
||||
app = connexion.App(__name__)
|
||||
app.add_api('openapi.yaml', options = {"swagger_ui": False})
|
||||
app.add_api('openapi.yaml', options = {"swagger_ui": True})
|
||||
|
||||
# CORSify it - otherwise Angular won't accept it
|
||||
CORS(app.app)
|
||||
|
Reference in New Issue
Block a user