change testoutput format

This commit is contained in:
2021-06-17 19:01:12 +02:00
parent 3d0e602ee6
commit b30e587c34
2 changed files with 17 additions and 7 deletions

11
auth.py
View File

@ -19,9 +19,10 @@ def decodeToken(token):
logger.error("{}".format(e))
raise werkzeug.exceptions.Unauthorized()
def testToken(user, token_info):
return '''
You are user_id {user} and the provided token has been signed by this issuers. Fine.'.
Decoded token claims: {token_info}.
'''.format(user=user, token_info=token_info)
def testToken(user, token_info):
return {
"message": f"You are user_id {user} and the provided token has been signed by this issuers. Fine.",
"details": token_info
}