Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download 331 Bytes
Copy Edit Web IDE Raw Blame History
Mendalas authored 2019-06-12 18:07 . new create
from flask_httpauth import HTTPTokenAuth
from user import User
from flask import Flask, abort, request, jsonify, g, url_for
auth = HTTPTokenAuth('Bearer')
def verify_token(token):
print "verify_token",token
user = User.verify_auth_token(token)
if not user:
return False
g.user = user
return True

Comment ( 0 )

Sign in for post a comment