当前位置:网站首页>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

边栏推荐
- Analysis of abnormal problems in domain name resolution in kubernetes
- (PKCS1) RSA 公私钥 pem 文件解析
- 根据网络上的视频的m3u8文件通过ffmpeg进行合成视频
- Robot acceleration level task priority inverse kinematics
- Tool functions – get all files in the project folder
- Swift Extension NetworkUtil(網絡監聽)(源碼)
- QOpenGL显示点云文件
- LabVIEW finds prime numbers in an array of n elements
- 2021-03-16 COMP9021第九节课笔记
- 1279_ Vsock installation failure resolution when VMware player installs VMware Tools
猜你喜欢

问题4 — DatePicker日期选择器,2个日期选择器(开始、结束日期)的禁用

OC extension detects whether an app is installed on the mobile phone (source code)

JUC个人简单笔记

The article takes you to understand the security of Windows operating system and protect your computer from infringement

2021-03-11 COMP9021第八节课笔记

小样本故障诊断 - 注意力机制代码 - BiGRU代码解析实现

搜索与推荐那些事儿

新技术实战,一步步用Activity Results API封装权限申请库

Utilisation de la fermeture / bloc de base SWIFT (source)

MAYA重新拓布
随机推荐
The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain
DHCP, TFTP Foundation
Installation and use of selenium IDE
小样本故障诊断 - 注意力机制代码 - BiGRU代码解析实现
2022茶艺师(中级)上岗证题库及在线模拟考试
2022年制冷与空调设备运行操作上岗证题库及模拟考试
李白最经典的20首诗排行榜
2021-03-09 COMP9021第七节课笔记
VR is destined to reappear in the Jianghu?
(PKCS1) RSA 公私钥 pem 文件解析
pyQt 中 QMenu 响应
Question 4 - datepicker date selector, disabling two date selectors (start and end dates)
MAYA重新拓布
Opening chapter of online document technology - rich text editor
你还只知道测试金字塔?
Promise的使用场景
Five level classification of loans
487. 最大连续1的个数 II ●●
VsCode主题推荐
Pagoda panel installation php7.2 installation phalcon3.3.2