当前位置:网站首页>普通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)
边栏推荐
- Swift 基础 闭包/Block的使用(源码)
- Transformers pretrainedtokenizer class
- Upgrade Mysql to the latest version (mysql8.0.25)
- Solve the problem of notebook keyboard disabling failure
- Optimization and practice of Tencent cloud EMR for cloud native containerization based on yarn
- [ACNOI2022]做过也不会
- Decltype usage introduction
- 李白最经典的20首诗排行榜
- GraphMAE----论文快速阅读
- Review of postgraduate English final exam
猜你喜欢

1279_VMWare Player安装VMWare Tools时VSock安装失败解决

李白最经典的20首诗排行榜

Blue Bridge Cup_ Queen n problem

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

2022茶艺师(中级)上岗证题库及在线模拟考试

Svn actual measurement common operation record operation

For a detailed explanation of flex:1, flex:1

Installation and use of selenium IDE
![[nilm] non intrusive load decomposition module nilmtk installation tutorial](/img/d0/bc5ea1cbca9ee96a2fe168484ffec4.png)
[nilm] non intrusive load decomposition module nilmtk installation tutorial

Swift 基础 闭包/Block的使用(源码)
随机推荐
Introduction to software engineering - Chapter 2 - feasibility study
Blue Bridge Cup_ Queen n problem
All you know is the test pyramid?
The first exposure of Alibaba cloud's native security panorama behind the only highest level in the whole domain
Saccadenet: use corner features to fine tune the two stage prediction frame | CVPR 2020
UTC、GMT、CST
OC extension detects whether an app is installed on the mobile phone (source code)
Swift extension chainlayout (UI chain layout) (source code)
Understanding of the concept of "quality"
SCM stm32f103rb, BLDC DC motor controller design, schematic diagram, source code and circuit scheme
论文笔记: 多标签学习 DM2L
13 -- 移除无效的括号
直播回顾 | 云原生混部系统 Koordinator 架构详解(附完整PPT)
SQL intra statement operation
Latest news of awtk: new usage of grid control
Synchronous FIFO
基金的募集,交易与登记
WCF TCP protocol transmission
Selenium IDE的安装以及使用
[teacher zhaoyuqiang] use the Oracle tracking file