当前位置:网站首页>Web Security (VII) specific process of authentication with session cookie scheme
Web Security (VII) specific process of authentication with session cookie scheme
2022-07-03 19:08:00 【jinyangjie0】
summary
every time web request , Actually by sessionId To identify the request session .
1、 When the client successfully requests the login interface and passes the authentication , The server records this time session Information , And put seesionId Back to the client , The client stores the information in cookie.
2、 When the same user sends a new request , Will be able to sessionId close , The server compares the existing session Information , User identity can be recognized .
Describe the process in more detail
1、 The user sends the user name to the server 、 password 、 The captcha is used to log in to the system .
2、 After the server is verified , The server creates a Session, And will Session Information stored .
3、 The server returns a... To the user SessionID, Write the user's Cookie.
4、 When the user remains logged in ,Cookie Will be sent with each subsequent request .
5、 The server can store in Cookie Upper SessionID And stored in memory or database Session Compare information , To authenticate the user , When the response information is returned to the user's client, the current status of the user will be attached .
Use Session Precautions for
1、 rely on Session Make sure the client is turned on Cookie.
2、 Be careful Session The expiration time of .
Multi server nodes Session-Cookie How to do it ?
When the server level expands to multiple nodes , Problems that may cause user login information to be out of sync .
Reference plan :
1、 All requests of a user are allocated to the same server for processing through the hash policy of the feature . In this case , Each server holds a portion of the user's Session Information . Server down , All that it keeps Session The information is completely lost .
2、 Every server keeps Session Information is synchronized with each other , That is to say, every server has saved the full amount of Session Information . Every time a server Session Information changes , We'll synchronize it to other servers . It's too expensive , also , More nodes , The higher the cost of synchronization .
3、 Use a single data node that all servers can access ( Such as caching ) To hold the Session Information . To ensure high availability , Try to avoid single data node .
边栏推荐
- Leetcode: 11. Récipient contenant le plus d'eau [double pointeur + cupidité + enlèvement de la plaque la plus courte]
- 为什么要做特征的归一化/标准化?
- leetcode:556. 下一个更大元素 III【模拟 + 尽可能少变更】
- 我眼中真正优秀的CTO长啥样
- SSM整合-前后台协议联调(列表功能、添加功能、添加功能状态处理、修改功能、删除功能)
- [new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
- my. INI file not found
- cipher
- 【疾病识别】基于matlab GUI机器视觉肺癌检测系统【含Matlab源码 1922期】
- Latex image rotates with title
猜你喜欢
![leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]](/img/d4/cbbaec40119be6cb5594899e348261.png)
leetcode:11. Container with the most water [double pointer + greed + remove the shortest board]
![[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]](/img/fc/00835b95537cf889588502a3d13bc9.png)
[disease identification] machine vision lung cancer detection system based on Matlab GUI [including Matlab source code 1922]

我们做了一个智能零售结算平台
![[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time](/img/06/5a37e2dca9711f8322b657581c3d75.png)
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time

DriveSeg:动态驾驶场景分割数据集
![[leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难](/img/8d/0e515af6c17971ddf461e3f3b87c30.png)
[leetcode周赛]第300场——6110. 网格图中递增路径的数目-较难

Getting started with JDBC

Analysis of dart JSON encoder and decoder

Ego planner code parsing Bspline_ Optimizer section (3)
![leetcode:556. Next larger element III [simulation + change as little as possible]](/img/a0/12e5ee5d01d666acb4b75ada2e6fec.png)
leetcode:556. Next larger element III [simulation + change as little as possible]
随机推荐
FBI warning: some people use AI to disguise themselves as others for remote interview
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
How to read the source code [debug and observe the source code]
Scrape crawler framework
Record: install MySQL on ubuntu18.04
Integrated easy to pay secondary domain name distribution system
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
Work Measurement - 1
Differential constrained SPFA
EGO Planner代码解析bspline_optimizer部分(1)
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
Ego planner code parsing Bspline_ Optimizer section (2)
The way to treat feelings
Valentine's Day - make an exclusive digital collection for your lover
application
math_泰勒公式
Streaming media server (16) -- figure out the difference between live broadcast and on-demand
The more you talk, the more your stupidity will be exposed.
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
Does SQL always report foreign key errors when creating tables?