def get_token():
if g.current_user.is_anonymous or g.token_used:
return unauthorized('Invalid credentials')
return jsonify(token=g.current_user.generate_auth_token(expiration=86400).decode(), expiration=86400,
email=g.current_user.email)
评论列表
文章目录