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:
Joseph Schorr 2014-02-25 15:07:24 -05:00
parent a120f6c64a
commit 61ca29de04
5 changed files with 12 additions and 14 deletions

7
auth/auth_context.py Normal file
View 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)