Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Active Publication Date: 2014-06-04
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF5 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] Second, the process of session replication between web application servers will affect the performance of the application server and increase the response time of the web application server to the browser page of the user client
[0009] It can be seen that because the existing JAAS login method relies on the Session mechanism, it is difficult to maintain the stable operation of the Web application system for the Web application system with an increasing number of users and concurrency

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • JAAS login method and server based on Cookie mechanism
  • JAAS login method and server based on Cookie mechanism
  • JAAS login method and server based on Cookie mechanism

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a JAVA authenticated and authorized (JAAS) login method and a server based on a Cookie mechanism. The method comprises the steps of receiving login requests from users, loading authentication information of the users after the login requests are authenticated successfully, generating corresponding identification for the authorization information, and storing the corresponding relation of the authorization information of the users and the corresponding identification thereof; adding the identification of the authorization information to current Cookie, and sending the Cookie to the users; receiving service requests from the users, wherein the service requests comprise the Cookie; obtaining the identification of the authorization information of the users from the Cookie, and searching the corresponding relation according to the identification of the authorization information to obtain the corresponding authorization information; adding the authorization information to a Session object to execute the service requests. According to the JAAS login method and the server based on the Cookie mechanism, JAAS login can be achieved independent of a Session mechanism.

Description

technical field [0001] The invention relates to the technical field of JAVA Web application systems, in particular to a JAVA authentication and authorization (JAAS) login method and server based on a Cookie mechanism. Background technique [0002] In today's Java Web application systems, system login is an indispensable function of every Web application system, and because of the wide use of Tomcat Web application server, the JAAS login method based on form authentication provided by it is also widely used in Web application systems. adoption. JAAS is implemented in a pluggable way, allowing the application system to remain independent from the underlying specific authentication technology. Adding or updating authentication methods does not need to change the application system itself, which well isolates the login verification of the application system from the application system itself. code. [0003] JAAS verifies the data provided in the form through the Tomcat applica...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): H04L29/06
Inventor 韩松
Owner BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD