Ejemplo n.º 1
0
def verify_token(token):
    g.current_user = User.check_token(token) if token else None
    # returned boolean determines if Flask-HTTPAuth allows view function to run
    return g.current_user is not None
Ejemplo n.º 2
0
def verify_token(token):
    g.current_user = User.check_token(token) if token else None
    return g.current_user is not None