当前位置:网站首页>jwt(json web token)
jwt(json web token)
2022-06-24 08:26:00 【xcrj】
effect
jwt Can be used for cross domain authentication
constitute
brief introduction
- jwt Full name json web token
- jwt from header.payload.signature form
constitute /header
{
"alg": "HS256",
"typ": "JWT"
}
constitute /payload
Common load : Optional
- iss(issue JWT Issued by )
- aud(auditor JWT The receiver )
- sub(subject, The theme )
- iat(issued at, The issuance of time )
- exp(expire, Due time )
- uid( user ID)
- username( user name )
- scopes( Scope of Authorization )
{
"iat": 1593955943,
"exp": 1593955973,
"uid": 10,
"username": "test",
"scopes": [ "admin", "user" ]
}
constitute /signature
// header, Algorithm pairs specified in JWT To sign ,secret Secret key
// secret, Encryption algorithm secret key
signature=HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)
technological process
Be careful :
- token Use after expiration refresh_token
- refresh_token Not expired will only generate new token, Will not generate refresh_token
- refresh_token After expiration, you can only log in again
- You can just use token Do not apply refresh_token

边栏推荐
- Upgrade Mysql to the latest version (mysql8.0.25)
- The applet reads more than 20 data, and the cloud function reads more than 100 restrictions
- [acnoi2022] I have done it, but I can't
- [teacher zhaoyuqiang] use the Oracle tracking file
- WPS的JS宏实现图片正文在同一段落的分离方法
- (PKCS1) RSA 公私钥 pem 文件解析
- LabVIEW查找n个元素数组中的质数
- pyQt 常用系统的事件
- Synthesize video through ffmpeg according to m3u8 file of video on the network
- Promise usage scenarios
猜你喜欢

2022年流动式起重机司机特种作业证考试题库及在线模拟考试

5分钟,客服聊天处理技巧,炉火纯青

【无标题】

More appropriate development mode under epidemic situation

jwt(json web token)

Application of JDBC in performance test

Synthesize video through ffmpeg according to m3u8 file of video on the network

Introduction to RCNN, fast RCNN and fast RCNN

Installation and use of selenium IDE

OC extension detects whether an app is installed on the mobile phone (source code)
随机推荐
longhorn安装与使用
1279_ Vsock installation failure resolution when VMware player installs VMware Tools
有关iframe锚点,锚点出现上下偏移,锚点出现页面显示问题.iframe的srcdoc问题
[acnoi2022] I have done it, but I can't
MySQL source and target table row count check
More appropriate development mode under epidemic situation
App Startup
Vscode topic recommendation
[ACNOI2022]做过也不会
【点云数据集介绍】
OC extension detects whether an app is installed on the mobile phone (source code)
How to use the virtual clock of FPGA?
Markdown 实现文内链接跳转
Question 4 - datepicker date selector, disabling two date selectors (start and end dates)
2021-03-04 COMP9021第六节课笔记
The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain
VR is destined to reappear in the Jianghu?
JS scroll div scroll bar to bottom
pyQt 中 QMenu 响应
Swift 基础 Swift才有的特性