JAAS login method and server based on Cookie mechanism
A login method and server technology, applied in electrical components, transmission systems, etc., can solve problems such as difficulty in maintaining the stable operation of the web application system, affecting the performance of the application server, increasing the response time of the web application server to the browser page of the user client, etc. , to avoid repeated logins, maintain stable operation, and reduce performance loss
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0054] This embodiment introduces the user login process, such as Figure 4 The implementation flowchart of the first embodiment includes:
[0055] Step 401: the user sends a login request, and the login request includes a user name and a password.
[0056] Step 402: After the application system receives the login request, it obtains the username and password from the login request, queries the user table to determine whether the username exists, and if so, further checks whether the password is correct.
[0057] If the user name does not exist or the password is incorrect, it means that the verification is unsuccessful, and the system login page is redirected to log in again;
[0058] Step 403: Load the user's authorization information (including roles, permissions, etc.), randomly generate a corresponding identifier for the authorization information; write the serialization result of the authorization information into the unified Redis cache as the Redis Value, and write th...
Embodiment 2
[0062] This embodiment introduces the process of processing the request after the user logs in successfully, such as Figure 5 It is the implementation flowchart of embodiment two, including:
[0063] Step 501: the user requests the Web application system, and the Web application system obtains the currently requested Cookie.
[0064] Step 502: Check whether the cookie is a valid cookie, if invalid, jump to the login page to log in again; if valid, perform step 503.
[0065] Step 503: Obtain the identifier of the user's authorization information from the cookie.
[0066] Step 504: use the identifier of the user's authorization information as the Redis Key, judge whether the Redis Key exists in the Redis cache, if not, load the authorization information of the current user, and write the serialization result of the authorization information into the Redis cache as Redis Value, and randomly generate the identification corresponding to the authorization information, write the i...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 