def get_token_from_cookie(): '''获取token''' return request.get_cookie('access_token', secret=SECRET)
def current_user(self): '''当前登录用户id''' return request.get_cookie('user_id', secret=SECRET)
def current_user_hash(self): '''当前登录用户hash''' return request.get_cookie('user_hash', secret=SECRET)