Beispiel #1
0
def login():
    try:
        auth_token = parse_auth_token()
        validate_auth_token(auth_token)
        return redirect(url_for('views.index'))
    except AuthenticationError:
        return render_template('login.html', api_root=current_app.config['API_ROOT'])
Beispiel #2
0
 def inject_auth_user():
     token = parse_auth_token()
     if token is None:
         return {}
     return {"auth_user": token.owner}