Move the auth context methods into their own file so that we don't have auth trying to import itself
This commit is contained in:
parent
a120f6c64a
commit
61ca29de04
5 changed files with 12 additions and 14 deletions
7
auth/auth_context.py
Normal file
7
auth/auth_context.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from flask import _request_ctx_stack
|
||||
|
||||
def get_authenticated_user():
|
||||
return getattr(_request_ctx_stack.top, 'authenticated_user', None)
|
||||
|
||||
def get_validated_token():
|
||||
return getattr(_request_ctx_stack.top, 'validated_token', None)
|
Reference in a new issue