简体   繁体   English

如何使用 flask_jwt_extended 注销

[英]How to logout with flask_jwt_extended

Generating jwt with flask_jwt_extended.使用 flask_jwt_extended 生成 jwt。

creating token创建令牌

create_access_token(identity=identity)

i couldn't find anything about logout.我找不到任何关于注销的信息。 Revoking jwt token撤销 jwt 令牌

Thanks谢谢

Define a callback function via the token_in_blocklist_loader() decorator.通过token_in_blocklist_loader()装饰器定义回调 function。

In practice you'd have some DB where you are keeping track of this.在实践中,您会拥有一些数据库来跟踪这一点。

I don't know what you mean by did not find anything, there is a documentation on revoking it that has some good advice.我不知道您所说的未找到任何内容是什么意思,有一份关于撤销它的文档提供了一些很好的建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用模板渲染实现flask_jwt_extended - implementing flask_jwt_extended with templates rendering 如何使用Flask和flask_jwt_extended进行自定义JWT验证? - How can I do custom JWT validation with Flask and flask_jwt_extended? flask_jwt_extended 中的字典 create_access_token - dictionary in flask_jwt_extended create_access_token flask_jwt_extended 给出“jwt.exceptions.InvalidSignatureError:签名验证失败”错误 - flask_jwt_extended giving "jwt.exceptions.InvalidSignatureError: Signature verification failed" error TypeError: Object of type function is not JSON serializable when using flask_jwt_extended int RESTful API - TypeError: Object of type function is not JSON serializable when using flask_jwt_extended int RESTful API 使用 Flask_jwt_extended 将刷新令牌签名密钥设置为用户的哈希密码 - Setting Refresh Token Signing Key to User's Hashed Password Using Flask_jwt_extended flask jwt扩展了如何通过观众 - flask jwt extended how to pass audience 如何将刷新令牌发布到 Flask JWT Extended? - How to POST the refresh token to Flask JWT Extended? 如何解决 Flask 中的版本冲突错误(PyJWT 和 Flask-JWT-Extended) - How to resolve versionConflict error in Flask (PyJWT and Flask-JWT-Extended) 如何使用REST API + Flask JWT Extended正确测试应用程序? - How to properly test an app with REST API + Flask JWT extended?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM