当前位置:网站首页>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 .
边栏推荐
- “google is not defined” when using Google Maps V3 in Firefox remotely
- Random numbers in a long range, is that right- Random number in long range, is this the way?
- Unity webgl optimization
- Flask generates swagger documents
- [proteus simulation] a simple encrypted electronic password lock designed with 24C04 and 1602LCD
- Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
- [new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
- 我们做了一个智能零售结算平台
- Summary of composition materials for 2020 high-frequency examination center of educational resources
- 235. The nearest common ancestor of the binary search tree [LCA template + same search path]
猜你喜欢

Nous avons fait une plateforme intelligente de règlement de détail

22.2.14 -- station B login with code -for circular list form - 'no attribute' - 'needs to be in path selenium screenshot deviation -crop clipping error -bytesio(), etc

Valentine's Day - make an exclusive digital collection for your lover
![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]

我們做了一個智能零售結算平臺
![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]

Transformer T5 model read slowly

Flutter网络和数据存储框架搭建 -b1

Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)

Zhengda futures news: soaring oil prices may continue to push up global inflation
随机推荐
Reading a line from ifstream into a string variable
FBI警告:有人利用AI换脸冒充他人身份进行远程面试
leetcode:11. 盛最多水的容器【双指针 + 贪心 + 去除最短板】
Failed to start component [StandardEngine[Catalina]. StandardHost[localhost]. StandardContext
Nous avons fait une plateforme intelligente de règlement de détail
Unity2018 to wechat games without pictures
leetcode:11. 盛最多水的容器【雙指針 + 貪心 + 去除最短板】
C enum contains value - C enum contains value
[academic related] how to find the innovation of top papers? Chinese universities won the CVPR Best Student Thesis Award for the first time
EGO Planner代码解析bspline_optimizer部分(3)
Record: solve the problem that MySQL is not an internal or external command environment variable
__ Weak and__ The difference between blocks
我眼中真正优秀的CTO长啥样
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
[new year job hopping season] test the technical summary of interviewers' favorite questions (with video tutorials and interview questions)
High concurrency architecture cache
How to read the source code [debug and observe the source code]
Pytorch introduction to deep learning practice notes 13- advanced chapter of cyclic neural network - Classification
SQL: special update operation
The more you talk, the more your stupidity will be exposed.