当前位置:网站首页>Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
Additional: [login information storage] and [login status verification]; (including: summarizing all the contents of [login information storage] and [login status verification] so far;)
2022-07-02 22:39:00 【Small withered forest】
explain :
(1) Why did you write this blog ?:
● stay 【27: The third chapter : Developing a pass service :10:【 register / Sign in 】 Interface : register / Sign in OK after , Send the user session information (uid,utoken) Save to redis and cookie in ;】 in , Register in development / When logging into the interface , We put the user session related information (uid and utoken), They exist separately 【 Front end browsing cookie】 and 【 Back end redis】;
● Obviously , This is for all the following “ Need to verify user login ” Prepare for the situation ; however , This is the practice in the case of distributed microservices ; and , I am relatively unfamiliar with this ;
● therefore , In order to better understand the above practice ;;; Feeling , Need to summarize , All the contents about login verification encountered before ;
(2) The content of this blog , Understanding may be biased 、 Incomplete 、 Even the wrong place ;
Catalog
3、 ... and :【 (17)SSM Develop Book Review Network 】: One SSM project ;
Four :【(19)Spring Boot E-commerce projects 】: One Spring Boot project ;
5、 ... and : The solution of this project ;
One :【(6) Enterprise portal case , Project development knowledge points ;】: A simple Servlet project ;
The project is simple , Login verification is not used ;
Two :【(12) MOOC OA System (Mybatis Project case , More important !)】 : One is used Mybatis Of Servlet project ;
The basic logic of this project is :
● When logging in , It stores the information of the logged in user session in ;
● In some places where you need to have a current login user , It will try from session Get the current login user information in ;;; If session There is login user information in , Everything OK;;; If not , The null pointer exception will be reported ;
(1) Front end landing page , enter one user name / After the password , If login is successful , Just put the information of the currently logged in user , It's stored in Session In the object ;
● After the above login is successful , Will jump to the page ;;;
● then , Jump to the new page , It will automatically call other interfaces ;
(2) then , In other places where you need the information of the currently logged in user , In this interface , Will try to start from session Get the current login user information in ;;; If session There is login user information in , Everything OK;
(3) natural , When you sign out here , Is to put Session Delete the data of user information in ( Or just put that session Get reimbursed );
(4) then , If at this time , Let's visit those 【 need session in , Interface with user information 】 when , Interface to try from session The statement to obtain user information in will report a null pointer exception ;
3、 ... and :【(17)SSM Develop Book Review Network 】: One SSM project ;
(1) register OK after , It just jumps to the login page ;
(2) After successful login , It stores user information in session In the object ;
(3) then , In other interfaces that require user login , from session Get user information in the object ;
Four :【(19)Spring Boot E-commerce projects 】: One Spring Boot project ;
(1) After successful login , User information is also stored in session In the object ;
(2) then , In other interfaces that require user login , from session Get user information in the object ;;; If you can get , Everything goes smoothly ;;; If not , Throw an exception ;
5、 ... and : The solution of this project ;
Simply speaking , This project is used to save user login information at the back end , There is no session, But use Redis;
however , Some distributed micro service projects , On the back end, it seems that the information is still stored session Medium , This seems to involve sharing session Wait for the content ;
Own to share session The content such as , Do not know much about , At present, there is no need to see ; When needed later , It's not too late to look for relevant information ;
边栏推荐
- [leetcode] sword finger offer 04 Search in two-dimensional array
- Oracle-PL/SQL编程
- kubernetes资源对象介绍及常用命令(四)
- Socket socket c/s end process
- "Actbert" Baidu & Sydney University of technology proposed actbert to learn the global and local video text representation, which is effective in five video text tasks!
- 影视随摘
- Radis:Linux上安装Redis(步骤)
- ServiceMesh主要解决的三大痛点
- Market Research - current situation and future development trend of cell-based seafood market
- Kubernetes resource object introduction and common commands (4)
猜你喜欢

Riding the wind of "cloud native" and stepping on the wave of "digitalization", new programmer 003 starts pre-sale

Leetcode circular linked list (fast and slow pointer) code line by line interpretation

UE4 游戏架构 学习笔记

NC50965 Largest Rectangle in a Histogram

What "real skills" should a million year old cloud native developer master? Alibaba, Tencent, meituan and byte decrypt together

Ransack组合条件搜索实现
![[shutter] shutter application theme (themedata | dynamic modification theme)](/img/77/6b0082368943aee7108ac550141f28.gif)
[shutter] shutter application theme (themedata | dynamic modification theme)

phpcms实现订单直接支付宝支付功能

Developers share | HLS and skillfully use Axi_ Customize the master bus interface instructions and improve the data bandwidth - area exchange speed

Pointer and string
随机推荐
scrcpy这款软件解决了和同事分享手机屏幕的问题| 社区征文
Tencent three sides: in the process of writing files, the process crashes, and will the file data be lost?
New feature of go1.18: introduce new netip Network Library
对象与对象变量
sql service 截取字符串
Based on asp Net (used mobile phone sales management system) +asp Net+c # language +vs2010+ database can be used for course design and post design learning
Notes on key vocabulary in the English original of the biography of jobs (10) [chapter eight]
"Actbert" Baidu & Sydney University of technology proposed actbert to learn the global and local video text representation, which is effective in five video text tasks!
[leetcode] sword finger offer 11 Rotate the minimum number of the array
《乔布斯传》英文原著重点词汇笔记(十)【 chapter eight】
Pointer array parameter passing, pointer parameter passing
Market Research - current market situation and future development trend of genome editing mutation detection kit
Oracle-PL/SQL编程
Market Research - current market situation and future development trend of night vision goggles for pilots
【微服务|Sentinel】重写sentinel的接口BlockExceptionHandler
附加:【登录信息存储】与【登录状态校验】;(包括:总结了到目前为止,有关【登录信息存储】与【登录状态校验】的所有内容;)
[ODX studio edit PDX] -0.1- how to quickly view the differences in supported diagnostic information between variant variants (service, sub function...)
Task and privilege level protection
ServiceMesh主要解决的三大痛点
Pointer and string









