当前位置:网站首页>生成token
生成token
2022-06-28 09:40:00 【Pert-】
pip install PyJWT
encoded = jwt.encode({"account": "13146152021","overdue_time":"1655827200"}, "secret", algorithm="HS256")
print(encoded)
res=jwt.decode(encoded, "secret", algorithms=["HS256"])
print(res)
##打印结果为:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhY2NvdW50IjoiMTMxNDYxNTIwMjEiLCJvdmVyZHVlX3RpbWUiOiIxNjU1ODI3MjAwIn0.VhPfiC0OC481eGmppxTa_OOLEyV-Itp6OGLeBe5ItXY
{'account': '13146152021', 'overdue_time': '1655827200'}
边栏推荐
- Proxy mode (proxy)
- Bridge mode
- JDBC connection database (MySQL) steps
- The constructor is never executed immediately after new()!!!!!
- 理想中的接口自动化项目
- Decorator
- 为什么 Istio 要使用 SPIRE 做身份认证?
- 满电出发加速品牌焕新,长安电动电气化产品吹响“集结号”
- 结巴分词器_分词器原理
- Redis sentinel cluster main database failure data recovery ideas # yyds dry goods inventory #
猜你喜欢

Ingersoll Rand面板维修IR英格索兰微电脑控制器维修XE-145M

mysql打不开,闪退

SQL中的DQL、DML、DDL和DCL是怎么区分和定义的

线程的生命周期

A classic JVM class loaded interview question class singleton{static singleton instance = new singleton(); private singleton() {}

Dolphin scheduler uses system time

Matplotlib attribute and annotation

JVM系列(2)——垃圾回收

bye! IE browser, this route edge continues to go on for IE

满电出发加速品牌焕新,长安电动电气化产品吹响“集结号”
随机推荐
卸载oracle报错
浅谈小程序对传媒行业数字化的影响
Summary of PMP learning experience
虛擬機14安裝win7(圖教程)
Key summary VII of PMP examination - monitoring process group (1)
Bron filter Course Research Report
我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
Which occupational groups are suitable for the examination
再见!IE浏览器,这条路由Edge替IE继续走下去
Differences between task parameter types inout and ref
自定义异常类及练习
Matplotlib属性及注解
The concept of "tree structure" perfectly interprets the primary and secondary of things
bad zipfile offset (local header sig)
Edit the live broadcast source code with me. How to write the live broadcast app code
通过PyTorch构建的LeNet-5网络对手写数字进行训练和识别
全链路业务追踪落地实践方案
优秀笔记软件盘点:好看且强大的可视化笔记软件、知识图谱工具Heptabase、氢图、Walling、Reflect、InfraNodus、TiddlyWiki
Write a simple timeline
Decorator