当前位置:网站首页>普通token
普通token
2022-06-24 06:57:00 【xcrj】
总结
token、session、header(Access-Token)、context作用域
过程
- 获取token:请求/login接口》校验用户名密码验证码》生成token》响应token
- 携带token:请求接口header加上Access-Token
- 校验token:从header中获取Access-Token》session表中的token对比(存在?过期?)
- 使用token:根据token从session表中获取用户信息》并存储到四大作用域中(可以存储到context域中)
token
token就是一串随机数字,生成之后被保存到session表中
token被用来唯一标识session表中的一行
token只是一个令牌,token中没有任何有效负载,jwt是有有效负载的,session表才是类似与jwt中有效负载
前端发送过来的token和数据库中session表中的token做对比
session
session表(token, user_id, expire_time)
边栏推荐
- Learning event binding of 3D visualization from scratch
- JDBC 在性能测试中的应用
- Unity culling related technologies
- [ACNOI2022]做过也不会
- Interview tutorial - multi thread knowledge sorting
- Leetcode 207: course schedule (topological sorting determines whether the loop is formed)
- Echart's experience (I): about y axis yaxis attribute
- VsCode主题推荐
- Dart development server, do I have a fever?
- From jsonpath and XPath to spl
猜你喜欢
![Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row](/img/16/011ba3aef1315c39526daac7e3ec89.png)
Leetcode 515 find the leetcode path of the maximum [bfs binary tree] heroding in each row

The monthly salary of two years after graduation is 36K. It's not difficult to say

Écouter le réseau d'extension SWIFT (source)

Introduction to software engineering - Chapter 2 - feasibility study

OC Extension 检测手机是否安装某个App(源码)

搜索与推荐那些事儿

WCF TCP protocol transmission

快速读论文----AD-GCL:Adversarial Graph Augmentation to Improve Graph Contrastive Learning

Live broadcast review | detailed explanation of koordinator architecture of cloud native hybrid system (complete ppt attached)
![[nilm] non intrusive load decomposition module nilmtk installation tutorial](/img/d0/bc5ea1cbca9ee96a2fe168484ffec4.png)
[nilm] non intrusive load decomposition module nilmtk installation tutorial
随机推荐
Review of postgraduate English final exam
LabVIEW查找n个元素数组中的质数
Learning event binding of 3D visualization from scratch
[ACNOI2022]做过也不会
Opening chapter of online document technology - rich text editor
[introduction to point cloud dataset]
Swift Extension ChainLayout(UI的链式布局)(源码)
C# Lambda
Analysis of abnormal problems in domain name resolution in kubernetes
Vscode topic recommendation
VR is destined to reappear in the Jianghu?
[008] filter the table data row by row, jump out of the for cycle and skip this cycle VBA
[teacher zhaoyuqiang] use the Oracle tracking file
Swift extension networkutil (network monitoring) (source code)
The monthly salary of two years after graduation is 36K. It's not difficult to say
到底哪一首才是唐诗第一?
2022茶艺师(中级)上岗证题库及在线模拟考试
12--合并两个有序链表
WCF TCP protocol transmission
Industrial computer anti cracking