Make our JWT subjects better and log using the info

Fixes #1039
This commit is contained in:
Joseph Schorr 2015-12-09 16:10:39 -05:00
parent 35437c9f55
commit 4a4eee5e05
10 changed files with 199 additions and 35 deletions

View file

@ -36,13 +36,13 @@ def set_authenticated_user(user_or_robot):
ctx.authenticated_user = user_or_robot
def get_grant_user_context():
return getattr(_request_ctx_stack.top, 'grant_user_context', None)
def get_grant_context():
return getattr(_request_ctx_stack.top, 'grant_context', None)
def set_grant_user_context(username_or_robotname):
def set_grant_context(grant_context):
ctx = _request_ctx_stack.top
ctx.grant_user_context = username_or_robotname
ctx.grant_context = grant_context
def set_authenticated_user_deferred(user_or_robot_db_uuid):