当前位置:网站首页>jwt(json web token)
jwt(json web token)
2022-06-24 06:57:00 【xcrj】
作用
jwt可用于跨域认证
构成
简介
- jwt全称json web token
- jwt由header.payload.signature组成
构成/header
{
"alg": "HS256",
"typ": "JWT"
}
构成/payload
常用负载:可选
- iss(issue JWT的签发者)
- aud(auditor JWT接收者)
- sub(subject,主题)
- iat(issued at,签发时间)
- exp(expire,到期时间)
- uid(用户ID)
- username(用户名)
- scopes(授权范围)
{
"iat": 1593955943,
"exp": 1593955973,
"uid": 10,
"username": "test",
"scopes": [ "admin", "user" ]
}
构成/signature
// header,中指定算法对JWT进行签名,secret秘钥
// secret,加密算法秘钥
signature=HMACSHA256(base64UrlEncode(header) + "." +base64UrlEncode(payload),secret)
流程
注意:
- token过期之后才会使用refresh_token
- refresh_token未过期只会生成新的token,不会生成refresh_token
- refresh_token过期之后只能重新登录
- 可以只使用token不适用refresh_token

边栏推荐
- Coordinate transformation of graphic technology
- For a detailed explanation of flex:1, flex:1
- 解决笔记本键盘禁用失败问题
- Graphmae ---- quick reading of papers
- Examples of corpus data processing cases (reading multiple text files, reading multiple files specified under a folder, decoding errors, reading multiple subfolder text, batch renaming of multiple fil
- 一文带你了解Windows操作系统安全,保护自己的电脑不受侵害
- Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row
- 51 single chip microcomputer_ External interrupt and timer / Counter interrupt
- Introduction to software engineering - Chapter 2 - feasibility study
- Installation and use of selenium IDE
猜你喜欢

Simple summary of lighting usage

Swift 基础 闭包/Block的使用(源码)

Model effect optimization, try a variety of cross validation methods (system operation)

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

2021-03-16 COMP9021第九节课笔记
![3D数学基础[十七] 平方反比定理](/img/59/bef931d96883288766fc94e38e0ace.png)
3D数学基础[十七] 平方反比定理
![[data update] Xunwei comprehensively upgraded NPU development data based on 3568 development board](/img/10/6725b51120a6ae8b16d60f5b1ae904.jpg)
[data update] Xunwei comprehensively upgraded NPU development data based on 3568 development board

模型效果优化,试一下多种交叉验证的方法(系统实操)

不止于观测|阿里云可观测套件正式发布

Coordinate transformation of graphic technology
随机推荐
Model effect optimization, try a variety of cross validation methods (system operation)
问题3 — messageBox弹框,修改默认背景色
Swift foundation features unique to swift
Robot acceleration level task priority inverse kinematics
Coordinate transformation of graphic technology
Review of postgraduate English final exam
The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain
Methods of vector operation and coordinate transformation
2021-03-04 COMP9021第六节课笔记
In the post epidemic era, the home service robot industry has just set sail
问题4 — DatePicker日期选择器,2个日期选择器(开始、结束日期)的禁用
基金的募集,交易与登记
MySQL source and target table row count check
Pipeline concept of graphic technology
Pagoda panel installation php7.2 installation phalcon3.3.2
12--合并两个有序链表
Selenium IDE的安装以及使用
LabVIEW查找n个元素数组中的质数
2021-03-11 COMP9021第八节课笔记
Future trends in automated testing