示例#1
0
def jupyter_auth(cookie_name, cookie_content):
    username = cookie_tool.parse_cookie(cookie_content, app.secret_key)
    if username == None:
        resp = make_response('cookie auth failed')
        resp.status_code = 404
        return resp
    return json.dumps({'name': username})
示例#2
0
文件: web.py 项目: SouvenirD/docklet
def jupyter_auth(cookie_name, cookie_content):
    username = cookie_tool.parse_cookie(cookie_content, app.secret_key)
    if username == None:
        resp = make_response('cookie auth failed')
        resp.status_code = 404
        return resp
    return json.dumps({'name': username})