def post(self): """Login a user.""" user = auth.login_user(flask.request) if not user: redir = auth.get_login_url() if redir: return dict(redirect=redir) return {} flask.session['user'] = user.uid return dict(user=user, team=user.team)
def post(self): """Login a user.""" user = auth.login_user(flask.request) if not user: redir = auth.get_login_uri() if redir: return dict(redirect=redir) return {} app.logger.info('%r logged in.', user) utils.session_for_user(user) return dict(user=user, team=user.team)