当前位置:网站首页>生成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'}
边栏推荐
- The constructor is never executed immediately after new()!!!!!
- 如何查看谷歌浏览器保存的网页密码
- 标识符的命名规则和规范
- Sword finger offer | Fibonacci sequence
- MySQL基础知识点总结
- 线程和进程
- Looking at jBPM from jbm3 to jbm5 and activiti
- SQL中的DQL、DML、DDL和DCL是怎么区分和定义的
- Starting from full power to accelerate brand renewal, Chang'an electric and electrification products sound the "assembly number"
- 全局异常处理器与统一返回结果
猜你喜欢

PMP考试重点总结八——监控过程组(2)

卸载oracle报错

Virtual machine 14 installing win7 (Figure tutorial)

For the development of short video app, the elder warned me to choose the open source code

Application of X6 in data stack index management

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

Explain final, finally, and finalize

HDI blind hole design, have you noticed this detail?
![QT signal and slot communication mechanism (when multiple windows communicate back and forth [parent and child windows])](/img/17/57ffb7393b71eddc5ac92ae3944338.jpg)
QT signal and slot communication mechanism (when multiple windows communicate back and forth [parent and child windows])

Decorator
随机推荐
创建多线程的方法---1创建Thread类的子类及多线程原理
bad zipfile offset (local header sig)
Installing redis under Linux and windows (ultra detailed graphic tutorial)
SQL中的DQL、DML、DDL和DCL是怎么区分和定义的
Dbeaver connects to kingbasees V8 (ultra detailed graphic tutorial)
我大抵是卷上瘾了,横竖睡不着!竟让一个Bug,搞我两次!
Comprehensive evaluation of outline note taking software workflow: advantages, disadvantages and evaluation
==And eqauls()
Wechat applet development log
谁知道在中信建投证券开户是不是安全的
装饰模式(Decorator)
Ingersoll Rand panel maintenance IR Ingersoll Rand microcomputer controller maintenance xe-145m
Threads and processes
MySQL的开发环境和测试环境有什么区别??
【OpenCV 例程200篇】213. 绘制圆形
DBeaver安装与使用教程(超详细安装与使用教程)
代理模式(Proxy)
Write a simple timeline
flink cep 跳过策略 AfterMatchSkipStrategy.skipPastLastEvent() 匹配过的不再匹配 碧坑指南
PMP needs to master its own learning methods