mirror of
https://github.com/veops/cmdb.git
synced 2025-08-07 20:48:31 +08:00
auth: add user in flask.g when auth by jwt
This commit is contained in:
@@ -53,6 +53,7 @@ def _auth_with_token():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
login_user(user)
|
login_user(user)
|
||||||
|
g.user = user
|
||||||
return True
|
return True
|
||||||
except jwt.ExpiredSignatureError:
|
except jwt.ExpiredSignatureError:
|
||||||
return False
|
return False
|
||||||
|
Reference in New Issue
Block a user