Web application access method, device, electronic device and storage medium

By setting up the webview webview component and the predetermined authentication server in the client, the client can be logged in at one time, and each web application can be accessed without login, which solves the problem of low access efficiency of web applications in the existing technology and improves access efficiency.

CN115665115BActive Publication Date: 2025-05-16CSC FINANCIAL CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210706370.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-21
Publication Date
2025-05-16
Estimated Expiration
2042-06-21

AI Technical Summary

Technical Problem

In the prior art, accessing each web application requires inputting an account password, which leads to cumbersome operations and low access efficiency.

Method used

By setting the webview webview component in the client and presetting the user agent UA, the client login can be realized, and each web application can be accessed without login. The specific steps include detecting that the user clicks on the web application portal, launching the webview component, obtaining the UA, sending an access request, and authenticating through the predetermined authentication server to obtain the interface information to be displayed.

Benefits of technology

It realizes one-time login of the client, and access and use of each web application without login, improving the access efficiency of web applications and reducing the number of times users enter their account passwords.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665115B_ABST
    Figure CN115665115B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a web application access method, device, electronic device and storage medium, which relates to the field of computer technology. The access method includes: after the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface, start the webview component; obtain and save the UA in the started webview component; obtain the webpage access address of the target web application; in the webview component, by loading the webpage access address of the target web application, send an access request for the target web application; load and display the interface information to be displayed for the target user of the target web application in the webview component. Through this solution, the client can log in once, and each web application can be accessed and used without logging in, thereby improving access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a web application access method, device, electronic device and storage medium. Background Art

[0002] With the development of the information age, more and more web applications have been developed by researchers. Since different web applications are independent of each other and different research and development architectures are quite different, when accessing each web application, you need to enter your account and password to log in to the web page corresponding to the web application. Among them, the web application can be an application built using HTML5 (the fifth generation hypertext markup language).

[0003] Since it is necessary to enter the account number and password corresponding to each web application to access each web application, the operation is cumbersome, resulting in low access efficiency of each web application. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a web application access method, device, electronic device and storage medium, so as to achieve one-time login of the client and access and use of various web applications without login, thereby improving access efficiency. The specific technical solution is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a web application access method, which is applied to a client, wherein a web view component is provided in the client, and a user agent UA for representing that a web page loading environment is a client environment is preset in the webview component; the method comprises:

[0006] After the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface, the webview component is started; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0007] Obtain and save the UA in the started webview component;

[0008] Obtaining the web page access address of the target web application;

[0009] In the webview component, by loading the webpage access address of the target web application, an access request for the target web application is sent, so that after receiving the access request, when the target web application detects that the sender of the access request has not logged in to the target web application, the target web application sends a specified authentication request for the client to a predetermined authentication server, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detects whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client;

[0010] The interface information to be displayed for the target user of the target web application is loaded and displayed in the webview component.

[0011] Optionally, in the webview component, before sending an access request to the target web application by loading the webpage access address of the target web application, the method further includes:

[0012] Using the target user's login information about the client, sending a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client;

[0013] Receiving and storing the target token;

[0014] The predetermined authentication server detects whether the client is in a logged-in state, including:

[0015] The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0016] Optionally, the predetermined authentication server uses the user name in the login information of the target user on the client to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user, including:

[0017] determining login information assigned to the target token;

[0018] The user name in the determined login information is used to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user.

[0019] In a second aspect, an embodiment of the present invention provides a web application access method, which is applied to a predetermined authentication server, wherein the predetermined authentication server is a server communicating with at least one web application, and the method includes:

[0020] Receive a designated authentication request for a client sent by a target web application; wherein the designated authentication request is sent by the target web application to the predetermined authentication server when it detects that the sender of the access request has not logged into the target web application after receiving the access request sent by the client; the access request is sent by the client after the target user successfully logs into the client and when it detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application;

[0021] Obtaining a user agent UA from the client; wherein the UA is used to characterize that the webpage loading environment is a client environment, and the UA is obtained and saved from the webview component after the client starts the webview component;

[0022] When identifying that the UA represents that the webpage loading environment is a client environment, detecting whether the client is in a logged-in state;

[0023] If it is detected that the target user is in a logged-in state, the user name in the login information of the target user on the client is used to obtain the user information to be used corresponding to the target web application for representing the target user, and the user information to be used is fed back to the target web application so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and the interface information to be displayed is fed back to the client so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

[0024] In a third aspect, an embodiment of the present invention provides a web application access system, comprising a client, a predetermined authentication server, and at least one web application; the client is provided with a web view webview component, and the webview component is preset with a user agent UA for representing that the web page loading environment is a client environment;

[0025] The client is used to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the designated interface after the target user successfully logs in; obtain and save the UA in the started webview component; obtain the webpage access address of the target web application; in the webview component, send an access request for the target web application by loading the webpage access address of the target web application; wherein the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0026] The target web application is used to, after receiving the access request, send a designated authentication request for the client to a predetermined authentication server when detecting that the sender of the access request is not logged into the target web application;

[0027] The predetermined authentication server is used to obtain the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detect whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtain the user information to be used corresponding to the target web application and used to represent the target user by using the user name in the login information of the target user on the client, and feed back the user information to be used to the target web application;

[0028] The target web application is further used to determine the interface information to be displayed of the target user represented by the user information to be utilized, and feed back the interface information to be displayed to the client;

[0029] The client is also used to load and display the to-be-displayed interface information of the target web application for the target user in the webview component.

[0030] Optionally, the client is further configured to, in the webview component, load the webpage access address of the target web application, and before sending an access request to the target web application, use the login information of the target user about the client to send a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client;

[0031] Receiving and storing the target token;

[0032] The predetermined authentication server detects whether the client is in a logged-in state, including:

[0033] The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0034] In a fourth aspect, an embodiment of the present invention provides a web application access device, which is applied to a client, wherein a web view component is provided in the client, and a user agent UA for representing that a web page loading environment is a client environment is preset in the webview component; the device comprises:

[0035] A startup module, configured to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the specified interface after the target user successfully logs in; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0036] A first acquisition module, used to acquire and save the UA in the started webview component;

[0037] A second acquisition module is used to acquire the web page access address of the target web application;

[0038] a sending module, configured to send an access request for the target web application by loading the webpage access address of the target web application in the webview component, so that after receiving the access request, the target web application sends a specified authentication request for the client to a predetermined authentication server when detecting that the sender of the access request has not logged into the target web application, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when recognizing that the webpage loading environment represented by the UA is the client environment, detects whether the client is in a logged-in state; if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client; a display module, configured to load and display the interface information to be displayed for the target user of the target web application in the webview component.

[0039] In a fifth aspect, an embodiment of the present invention provides a web application access device, which is applied to a predetermined authentication server, wherein the predetermined authentication server is a server communicating with at least one web application, and the device includes:

[0040] A receiving module, configured to receive a designated authentication request for a client sent by a target web application; wherein the designated authentication request is sent by the target web application to the predetermined authentication server when it detects that the sender of the access request has not logged into the target web application after receiving the access request sent by the client; the access request is sent by the client after the target user successfully logs into the client and when it detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application;

[0041] A third acquisition module is used to acquire a user agent UA from the client; wherein the UA is used to characterize that the web page loading environment is a client environment, and the UA is acquired and saved from the webview component after the client starts the webview component;

[0042] A detection module, configured to detect whether the client is in a logged-in state when recognizing that the UA represents that the webpage loading environment is a client environment;

[0043] The fourth acquisition module is used to, if it is detected that the target user is in a logged-in state, use the user name in the login information of the target user on the client to obtain the user information to be used corresponding to the target web application for representing the target user, and feed back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feed back the interface information to be displayed to the client, so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

[0044] In a sixth aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0045] Memory, used to store computer programs;

[0046] The processor is used to implement any web application access method when executing the program stored in the memory.

[0047] In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any web application access method is implemented.

[0048] The embodiment of the present invention further provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any of the web application access methods described above.

[0049] Beneficial effects of the embodiments of the present invention:

[0050] The web application access method provided by the embodiment of the present invention starts the webview component if the client detects that the target user clicks on the entrance of the target web application in the specified interface after the target user successfully logs in to the client; then, the UA in the started webview component is obtained and saved, and the webpage access address of the target web application is obtained; and, in the webview component, an access request for the target web application is sent by loading the webpage access address of the target web application, so that after receiving the access request, the target web application sends a specified authentication request for the client to a predetermined authentication server when it detects that the sender of the access request has not logged in to the target web application, and then identifies the loading of the webpage access address of the target web application. When the environment is a client environment, it is possible to detect whether the client is in a logged-in state. If it is in a logged-in state, it is considered that the target user is also in a logged-in state for the target web application. It is not necessary to enter the account password to access the web page corresponding to the web application when accessing each web application. The user name in the target user's login information about the client can be used to obtain the target web application corresponding to the target user to be used. The user information to be used is fed back to the target web application, so that the target web application determines the target user's interface information to be displayed represented by the user information to be used, and feeds back the interface information to be displayed to the client, and loads the target web application's interface information to be displayed for the target user into the webview component. It can be seen that when accessing a web application, this solution does not need to enter an account password for each web application to log in, but detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, through this solution, the client can log in once, and each web application can be accessed and used without logging in, which can improve the access efficiency of the web application.

[0051] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0053] Figure 1 A schematic diagram of a flow chart of a web application access method provided from a client perspective according to an embodiment of the present invention;

[0054] Figure 2 A schematic diagram of a flow chart of a web application access method provided from the perspective of a predetermined authentication server in an embodiment of the present invention;

[0055] Figure 3 A schematic diagram of the structure of a web application access system provided by an embodiment of the present invention;

[0056] Figure 4 A schematic diagram of a process flow of a web application access system provided by an embodiment of the present invention;

[0057] Figure 5 Another flowchart of a web application access system provided by an embodiment of the present invention;

[0058] Figure 6 A schematic diagram of the structure of a web application access device provided from the perspective of a client in an embodiment of the present invention;

[0059] Figure 7 A schematic diagram of the structure of a web application access device provided by an embodiment of the present invention from the perspective of a predetermined authentication server;

[0060] Figure 8 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.

[0062] In order to solve the problem of low access efficiency when accessing various web applications in the related art, the embodiments of the present invention provide a web application access method, device, electronic device and storage medium.

[0063] The following first introduces a web application access method provided by an embodiment of the present invention from the perspective of a client.

[0064] It should be noted that a web application access method provided from the client's perspective is applied to the client, wherein a web view webview component is provided in the client, and a user agent UA for characterizing the web page loading environment as the client environment is preset in the webview component. Exemplarily, the client may be an APP (Application) for managing various web applications. Moreover, the client may communicate with a predetermined authentication server, and the predetermined authentication server may be used to provide authentication and other services for various web applications; in addition, the device running the predetermined authentication server may be a server, and the device running the client may be a user terminal, and the user terminal may be a mobile phone, a computer or other device. Exemplarily, the predetermined authentication server may be a cas (Central Authentication Service) server.

[0065] In addition, the client and each web application in the embodiment of the present invention can be different software programs of the same enterprise, or software programs of different enterprises that can access each other. In addition, the web application here can be a web application built using HTML5 (fifth generation hypertext markup language), of course, it is not limited to this, for example: web applications built in other languages, or applet applications, etc.

[0066] Among them, a web application access method provided by an embodiment of the present invention from the perspective of a client may include the following steps:

[0067] After the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface, the webview component is started; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0068] Obtain and save the UA in the started webview component;

[0069] Obtaining the web page access address of the target web application;

[0070] In the webview component, by loading the webpage access address of the target web application, an access request for the target web application is sent, so that after receiving the access request, when the target web application detects that the sender of the access request has not logged in to the target web application, the target web application sends a specified authentication request for the client to a predetermined authentication server, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detects whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client;

[0071] The interface information to be displayed for the target user of the target web application is loaded and displayed in the webview component.

[0072] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0073] Combine the following Figure 1 , a web application access method provided by an embodiment of the present invention from the client perspective is introduced.

[0074] The client involved in the embodiment of the present invention is provided with a web view component, and the web view component is preset with a user agent UA for representing that the web page loading environment is a client environment. Figure 1 As shown, a web application access method provided by an embodiment of the present invention from the perspective of a client may include the following steps:

[0075] S101: After the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface, the webview component is started;

[0076] The designated interface is an interface of the client for displaying an access portal of at least one web application, and the target web application is any one of the at least one web application;

[0077] Among them, after the target user successfully logs in to the client, in order to solve the existing technical problems, the client can detect whether the target user clicks on the entrance of the target web application in the specified interface. If the detection result is yes, that is, the target user clicks on the access entrance of the target web application, it indicates that the target user wants to access the target web application. At this time, the step of starting the webview component can be used to subsequently display the interface of the target web application based on the webview component.

[0078] It should be noted that the designated interface can be any interface in the client that can display at least one access entry of a web application, and the designated interface is not limited here; and the designated interface can also be called an application platform, in which case the application platform includes at least one access entry of a web application. In addition, the target web application is any web application in the at least one web application displayed in the designated interface, and the target web application can be, for example, an enterprise training application system, an enterprise attendance application system, or an enterprise approval application system, etc.

[0079] In addition, the webview component is a view component used to display the interface information of the target web application clicked by the target user. By starting the webview view component and executing the subsequent steps of the web application access method, the information to be displayed of the target web application accessed by the target user can be obtained, and finally the information to be displayed is displayed in the webview component to achieve access to the target web application.

[0080] S102: Acquire and save the UA in the started webview component;

[0081] When it is detected that the target user clicks on the entrance of the target web application in the specified interface and starts the webview component, the UA in the started webview component can be obtained and saved so that the predetermined authentication server can use the UA to perform subsequent steps.

[0082] It should be noted that UA (User Agent) is used to characterize the webpage loading environment of the target web application, and the predetermined authentication server can use UA to identify that the target web is accessed as a client environment.

[0083] In addition, UA may include two categories, for example: first-category UA and second-category UA, wherein the first-category UA is a UA used to characterize that the webpage loading environment of the target web application is a client environment; the second-category UA is a UA used to characterize that the webpage loading environment of the target web application is a non-client environment, for example: a UA whose webpage loading environment is a browser page environment. Moreover, since the launched webview component is located in the client, the UA in the launched webview component may be a first-category UA, and the predetermined authentication server may use the UA to identify that the webpage loading environment of accessing the target web application is a client environment, and then execute the subsequent steps.

[0084] S103: Obtaining the web page access address of the target web application;

[0085] After acquiring and saving the UA of the started webview, the web page access address of the target web application can be acquired, and through subsequent steps, the web page access address is accessed to achieve access to the target web application.

[0086] In addition, there are many ways to obtain the web page access address of the target web application, which are not limited here. For example, the web page access address corresponding to the access entry clicked by the target user can be obtained from the correspondence between the web page access address and the access entry of at least one web application established in advance, so as to obtain the web page access address of the target web application. For example, the web page access address of any web application is a URL address, wherein URL (Uniform Resource Locator) is used to indicate the specific web page location of the web application.

[0087] S104: in the webview component, by loading the webpage access address of the target web application, an access request for the target web application is sent, so that after receiving the access request, the target web application sends a specified authentication request for the client to a predetermined authentication server when it is detected that the sender of the access request has not logged in to the target web application, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when it is identified that the webpage loading environment represented by the UA is a client environment, detects whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client;

[0088] It should be noted that the user information to be used may be information that can uniquely identify the user, such as the user ID and user name; the predetermined authentication server may pre-record the user information to be used corresponding to the user name in the login information. Furthermore, after obtaining the user information to be used, the target web application may determine the target user, and then obtain the interface information to be displayed for the target web application by the target user.

[0089] In addition, the specified authentication request may carry information such as the terminal identifier of the terminal where the client is located, so that the predetermined authentication server can obtain the UA of the terminal from the client of the terminal; that is, different users use different terminals where the client is located. When different users use different terminals to access the web application using the client, the specified authentication request may carry the terminal identifiers of different terminals. As a result, the predetermined authentication server can obtain different UAs from different terminals, and the target web application can feedback the interface information to be displayed for different users to different terminals.

[0090] After obtaining the web page access address of the target web application, the target web application can be accessed by using the web page access address of the target web application. For example, the web page access address can be entered in the webview component, and an access request for the target web application is sent to the target web application by loading the web page access address. After receiving the access request, the target web application, when detecting that the sender of the access request has not logged into the target web application, can then send a specified authentication request for the client to a predetermined authentication server. When the predetermined authentication server detects that the client is in a logged-in state, it can feed back user information to be used to the target web application, and then the target web application can feed back interface information to be displayed to the client.

[0091] It should be noted that, based on the specified authentication request, the predetermined authentication server can first obtain the UA of the started webview component from the client, and when the UA is identified to represent that the web page loading environment is a client environment, it can detect whether the client is in a logged-in state. If it is in a logged-in state, it is determined that the target user is also in a logged-in state for the target web application, that is, by logging in to the client once, access to various web applications connected to the client can be achieved without logging in; thereafter, the user name of the target user's login information for the client can be used to obtain the target user information to be used for the target web application, and the target web application can feed back the target user information to be used, and the target web application can use the target user information to be used to determine the target user's interface information to be displayed, and feed back the interface information to be displayed to the client.

[0092] In addition, if UA identifies that the web page loading environment represented by UA is a non-client environment, that is, the web page loading environment is an environment other than the client environment, such as a browser page environment, etc., then it can be determined that the target user has not logged in to the target application system and needs to use the login information to log in to the target application system.

[0093] There are many ways for the target web application to determine the interface information to be displayed of the target user represented by the user information to be used, which are not limited here. For example, in one implementation, for security reasons, the predetermined authentication server can encrypt the user information to be used. The encryption method can be: encrypt the user information to be used using an encryption algorithm, or the predetermined authentication server uses the user information to be used to send a request similar to the above-mentioned target token to the target web application, and insert the user information to be used into the target token according to a predetermined rule. Correspondingly, the target web application can decode the user information to be used from the request containing the target token or the encrypted user information to be used, and determine the interface information to be displayed of the target user represented by the user information to be used. In another implementation, the predetermined authentication server can directly feed back the user information to be used to the target web application, and the target web application can directly determine the interface information to be displayed of the target user represented by the user information to be used.

[0094] It should be noted that the method for the predetermined authentication server to detect whether the client is in a logged-in state and the method for obtaining the user information to be used by using the user name will be introduced later and will not be described in detail here.

[0095] S105: Loading and displaying the interface information to be displayed for the target user of the target web application in the webview component;

[0096] After obtaining the interface information to be displayed fed back by the target web application, the interface information to be displayed can be loaded and displayed in the webview component to achieve access to the target web application.

[0097] It should be noted that the interface information to be displayed for the target user of the target web application is loaded and displayed in the webview component, that is, each information of the interface information to be displayed is loaded and displayed in the corresponding position in the webview component, for example: the interface information to be displayed includes: user name: XXX; user number: 123456; user gender: male; user application items: leave application and other information. Then, XXX, 123456, male and leave application and other information can be loaded and displayed in the positions corresponding to the user name, user number, user gender and user application items respectively.

[0098] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0099] Optionally, in another embodiment of the present invention, in the webview component, before sending an access request to the target web application by loading the webpage access address of the target web application, the method further includes:

[0100] Using the target user's login information about the client, sending a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client;

[0101] Receiving and storing the target token;

[0102] The predetermined authentication server detects whether the client is in a logged-in state, including:

[0103] The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0104] Optionally, the predetermined authentication server uses the user name in the login information of the target user on the client to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user, including:

[0105] determining login information assigned to the target token;

[0106] Using the user name in the determined login information, to-be-used user information of the target web application for the target user is obtained.

[0107] Among them, the target token can be an access_token. Each time a token request is sent to the predetermined authentication server to indicate that the client is in a logged-in state, the predetermined authentication server can allocate a target token corresponding to the login information to the client. The target token can have a certain timeliness, that is, it is valid within a period of time, for example: 10 minutes, 1 minute, etc. Alternatively, after the user name in the login information of the target token is used to obtain the user information to be used, the target token becomes invalid. Exemplarily, the user name contained in the login information of the target token can be XYZ. When the user information to be used is obtained using the user name XYZ, the user name XYZ becomes invalid. The next time a token request is sent to the predetermined authentication server to indicate that the client is in a logged-in state, the allocated target token can be ABC. This is all reasonable.

[0108] It should be noted that before sending an access request to the target web application, the user's login information about the client can also be encrypted, that is, using the login information, a token request indicating that the client is in a logged-in state is sent to the predetermined authentication server, and the predetermined authentication server allocates a target token corresponding to the login information to the client. Exemplarily, the login information of the target user includes a user name 123. After sending the token request, the user name included in the received target token can be abc. Subsequently, the preset interface for obtaining token information of the client can be called to obtain the target token, and detect whether the target token is expired, that is, the target token has a time limit. When it is within the time range of the time limit, that is, the target token has not expired, it can be determined that the client is in a logged-in state. When it is detected that the client is in a logged-in state, the login information assigned with the target token can be determined, and the user name in the login information can be used to obtain the user information to be used by the target web application for the target user; for example, if the user name is abc, the user information to be used by the target user with the user name abc in the target web application can be obtained. By determining the client's login status and obtaining the user information to be used through a time-sensitive target token, it is possible to avoid information leakage of the web application caused by the leakage of the username during the interaction between the client and the predetermined authentication server, thereby improving the security of web application access.

[0109] Optionally, in another embodiment of the present invention, the predetermined authentication server detects whether the client is in a logged-in state, including:

[0110] A preset interface for requesting login information for the client is called to request the target user's login information about the client from the client. If the request is obtained, it is detected that the client is in a logged-in state.

[0111] Optionally, the predetermined authentication server uses the user name in the login information of the target user on the client to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user, including:

[0112] Get the username from the requested login information;

[0113] The obtained user name is used to obtain the to-be-used user information of the target web application for the target user.

[0114] In addition, the preset interface for requesting login information of the client can be directly called to request the target user's login information about the client from the client. If the request is obtained, that is, the client contains the target user's login information, it can be detected that the client is in a logged-in state.

[0115] When it is detected that the client is in a logged-in state, the user name can be obtained from the requested login information, and the corresponding user information to be used can be obtained using the user name; for example, if the user name is: 123, the user information to be used of the target user with the user name 123 in the target web application can be obtained.

[0116] The login status of the client is determined through the login information, and the corresponding user information to be used is obtained through the user name in the login information. There is no need to use the login information to send a token request to a predetermined authentication server, that is, there is no need to encrypt the login information. The user name in the login information can be directly used to determine the user information to be used, thereby improving the access efficiency of the web application.

[0117] Combine the following Figure 2 , another web application access method provided by an embodiment of the present invention from the perspective of a predetermined authentication server is introduced.

[0118] The predetermined authentication server involved in the embodiment of the present invention is a server communicating with at least one web application, such as Figure 2 As shown, a web application access method provided by an embodiment of the present invention from the perspective of a predetermined authentication server may include the following steps:

[0119] S201: receiving a designated authentication request for a client sent by a target web application;

[0120] Wherein, the designated authentication request is sent by the target web application to the predetermined authentication server after receiving the access request sent by the client and detecting that the sender of the access request has not logged into the target web application; the access request is sent by the client after the target user successfully logs into the client and the client detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application;

[0121] After the client sends an access request to the target web application, and the target web application receives the access request, if it is detected that the sender of the access request has not logged into the target web application, the predetermined authentication server may receive the specified authentication request and, based on the specified authentication request, feed back the user information to be used to the target web application by executing subsequent steps, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client.

[0122] S202: Obtain a user agent UA from the client;

[0123] The UA is used to represent that the webpage loading environment is a client environment, and the UA is obtained and saved from the webview component after the client starts the webview component;

[0124] After receiving the specified authentication request, the predetermined authentication server may obtain the user agent UA from the client, and perform subsequent steps through the user agent UA to detect whether the client is in a logged-in state.

[0125] It should be noted that there are multiple ways to obtain the user agent UA from the client. For example, an instruction to obtain the user agent UA can be sent to the client so that the client can feed back the saved user agent UA to the predetermined authentication server; or, the data content of the user agent UA belonging to the client in the access request sent by the client for the target web application can be read to obtain the user agent UA.

[0126] S203: When it is identified that the UA represents that the webpage loading environment is a client environment, detecting whether the client is in a logged-in state;

[0127] When the UA identifies that the UA represents the web page loading environment as a client environment, it can be detected whether the client is in a logged-in state. If the client is in a logged-in state, it can be considered that the target user is also in a logged-in state for the target web application, that is, by logging in to the client once, web application access is achieved for each web application connected to the client without logging in.

[0128] It should be noted that there may be multiple ways to detect whether a client is in a logged-in state. Exemplarily, in one implementation, a token request for indicating that the client is in a logged-in state may be received, sent by the client using the target user's login information about the client, and a target token corresponding to the login information may be allocated to the client; then a preset interface for obtaining token information for the client may be called to obtain the target token from the client. If the target token is obtained, it may be identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0129] Exemplarily, in another implementation, a preset interface for requesting login information for the client may be directly called to request the target user's login information about the client from the client. If the request is obtained, it is detected that the client is in a logged-in state.

[0130] The above description of the method for detecting whether the client is in a logged-in state is merely an example and should not be construed as limiting the present invention.

[0131] S204: If it is detected that the target user is in a logged-in state, the user name in the login information of the target user on the client is used to obtain the to-be-used user information corresponding to the target web application and used to represent the target user, and the to-be-used user information is fed back to the target web application, so that the target web application determines the to-be-used interface information of the target user represented by the to-be-used user information, and the to-be-used interface information is fed back to the client, so that the client loads and displays the to-be-used interface information of the target web application for the target user in the webview component;

[0132] If it is detected that the client is in a logged-in state, the user name in the target user's login information about the client can be used directly, or the login information assigned to the target token can be determined first, and the user name in the login information can be used to obtain the target web application's user information for the target user. This is all reasonable.

[0133] In addition, the user information to be used is fed back to the target web application so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and the interface information to be displayed is fed back to the client so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component. The method is similar to the above step S104 and will not be repeated here.

[0134] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0135] Based on the above web application access method, the embodiment of the present invention also provides a web application access system, such as Figure 3 As shown, the system includes a client, a predetermined authentication server, and at least one web application; the client is provided with a web view component, and the webview component is preset with a user agent UA for representing that the web page loading environment is a client environment;

[0136] The client 310 is used to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the designated interface after the target user successfully logs in; obtain and save the UA in the started webview component; obtain the webpage access address of the target web application; in the webview component, send an access request for the target web application by loading the webpage access address of the target web application; wherein the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0137] The target web application 320 is used to send a designated authentication request for the client to a predetermined authentication server after receiving the access request when detecting that the sender of the access request is not logged into the target web application;

[0138] The predetermined authentication server 330 is used to obtain the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detect whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtain the user information to be used corresponding to the target web application and used to represent the target user by using the user name in the login information of the target user on the client, and feed back the user information to be used to the target web application;

[0139] The target web application 320 is further used to determine the interface information to be displayed of the target user represented by the user information to be utilized, and feed back the interface information to be displayed to the client;

[0140] The client 310 is further configured to load and display the interface information to be displayed of the target web application for the target user in the webview component.

[0141] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0142] Optionally, the client is further configured to, in the webview component, load the webpage access address of the target web application, and before sending an access request to the target web application, use the login information of the target user about the client to send a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client;

[0143] Receiving and storing the target token;

[0144] The predetermined authentication server detects whether the client is in a logged-in state, including:

[0145] The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0146] Optionally, the predetermined authentication server uses the user name in the login information of the target user on the client to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user, including:

[0147] determining login information assigned to the target token;

[0148] The user name in the determined login information is used to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user.

[0149] Optionally, the predetermined authentication server obtains the UA from the client, including:

[0150] A preset interface for obtaining a user agent for the client is called to obtain the UA from the client.

[0151] Combine the following Figure 4 A web application access system provided by an embodiment of the present invention is introduced in detail.

[0152] like Figure 4 As shown, from the perspective of logical functions, the client in the web application access system can include: APP system service layer, APP UI (User Interface) layer, container layer, and the access entrance of each web application can be located in the business layer.

[0153] The APP system service layer forms some basic functions of the APP, such as: APP basic information, which can include information about the purpose, introduction, functions, etc. of the APP; application SDK, that is, the software development kit (SDK), which is the software package that the APP itself needs to apply; push, share, statistics, etc., which can realize functions such as push, share, statistical data or information; network services, that is, services that need to communicate through network connections, such as data interaction, data transmission, etc. The APP system service can push data content to the APP UI layer to form various interfaces of the APP UI.

[0154] The APP UI layer includes various interfaces in the APP, such as: the home page, which is the home page interface displayed after logging into the APP; the application platform, which is the interface composed of the access portals of multiple applications in the APP, corresponding to the above-mentioned specified interface; the message, which is the interface used to receive or send messages in the APP; the address book, which is the address book interface composed of the information of each contact in the APP. Of course, other functions can also be included, and are not limited to these. When the user clicks on the system entrance in the application platform, the application platform can send a startup instruction to the container layer so that the container layer starts the mPaaS engine (the mPaaS engine includes a webview component, corresponding to the above-mentioned if it is detected that the target user clicks on the entrance of the target web application in the specified interface, the webview component is started, and the UA of the started webview component can be further obtained and saved)

[0155] The container layer includes the mPaaS engine (mobile development platform, Mobile PaaS), and the mPaaS engine includes JSbridge (JavaScript interface). The predetermined authentication server can call JSbridge in the mPaaS engine, obtain the user name, and use the user name to determine the user information to be used. The mPaaS engine includes a webview component, which can send access requests for various businesses to the business layer, and can also load and display the interface information to be displayed of the web application accessed by the target user. Corresponding to the above, in the webview component, by loading the web access address of the target web application, an access request for the target web application is sent, and the interface information to be displayed for the target user of the target web application is loaded and displayed in the webview component. In addition, other independently running application systems, such as offline systems stored in local devices, applets and other application systems, can use the mPaaS engine to call the interface of the device to which it belongs, and connect the application system to the application platform of the APP.

[0156] The business layer can be regarded as an application platform, which contains multiple application entrances, such as attendance application, approval application, training application or CMS (Content Management System) application, etc., which can realize multiple H5 application entrances with different functions, which can also include small program applications, business functions contained in Android and / or ios (iPhone OS) operating systems. The container layer can use the access entrances of each web application in the business layer to determine the web page access address of the web application. Corresponding to the above-mentioned correspondence between the web page access address and the access entrance of at least one web application established in advance, the network access address corresponding to the access entrance clicked by the target user is obtained to obtain the web page access address of the target web application.

[0157] The client for web application access provided by the present invention can be compatible with the access of multiple applications such as native, applet, offline H5, online H5, etc., and after different web applications are accessed to the client, the login-free security verification of different web applications can be realized. Different web applications provide a unified interface access, which reduces the mutual calls between different systems, so that different web applications can be integrated into a client for fast access. For multiple web applications of an enterprise, the client for web application access provided by the present invention can quickly access different web applications of the enterprise, and can be mobile and convenient for office work, thereby improving work efficiency. In addition, the present invention integrates the access entrances of multiple web applications, realizes only logging in to the client once, and other web applications accessed to the client can be accessed without login, thereby improving the research and development and access efficiency of web applications, reducing the cost of users logging in between different web applications and searching for web page access addresses, improving the access speed and operating efficiency of users to each web application, and improving the compatibility and extensibility of the client platform.

[0158] Combine the following Figure 5 Another web application access system provided by an embodiment of the present invention is introduced in detail.

[0159] like Figure 5 As shown, the web application access system may include: APP native side, H5 application side and login authentication service.

[0160] The native side of the APP is the client mentioned above. First, the user can log in to the APP with the account and password. After logging in, the H5 application can be accessed. The H5 application includes H5 websites such as OA (Office Automation) and offline H5 applications in the application platform (that is, the access entrance of each web application in the specified interface), such as Figure 4 The application platform of the APP UI layer and the various H5 applications of the business layer correspond to the above-mentioned after the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface; then the webview can be started, that is, the above-mentioned start of the webview component; writing UA corresponds to the above-mentioned acquisition and saving of the UA in the started webview component; storing userID, that is, storing the user name in the user login information; accessing url, corresponding to the above-mentioned acquisition of the web page access address of the target web application, and sending an access request for the target web application by loading the web page access address of the target web application.

[0161] The H5 application side, that is, the target web application mentioned above, can load the URL, that is, load the URL accessed by the client, and then determine whether the user is logged in to the H5 application system. If the user is logged in to the H5 application system, the web page access address accessed by the user is directly loaded. If the user is not logged in to the H5 application system, it is necessary to log in to the authentication service to send an authentication request to further determine whether the user is logged in to the H5 application system; corresponding to the above-mentioned target web application, after receiving the access request, when it is detected that the sender of the access request has not logged in to the target web application, a specified authentication request for the client is sent to the predetermined authentication service end.

[0162] The login authentication service is the above-mentioned predetermined authentication server, which can also be called cas (Central Authentication Service) server here. The login authentication service can receive the authentication request sent by the H5 application side, and then perform login authentication: first, it is necessary to identify the UA written by the native side of the APP, that is, the above-mentioned acquisition of the user agent UA from the client. If the UA identifies that the access environment of the user to the H5 application is the APP environment, the userID stored in the native side of the APP can be obtained. If the acquisition fails, an error is prompted to the H5 application side; if the acquisition is successful, the authentication is successful, and it is considered that the user has completed the login to the H5 system, and the user information (corresponding to the above-mentioned user information to be used) can be returned to the H5 application side. The H5 system can feedback the interface information to be displayed determined by using the user information to the client. The client can load the content of the interface information to be displayed into the webview component, corresponding to the above-mentioned when identifying that the UA represents the web page loading environment as the client environment, using the username or target token to detect whether the client is in a logged-in state; if it is detected that it is in a logged-in state, using the username in the login information of the target user about the client, obtaining the user information to be used corresponding to the target web application for representing the target user, and feeding back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeding back the interface information to be displayed to the client so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

[0163] If UA identifies that the user's access environment to the H5 application is a non-APP environment, the user may not be logged in at this time. In this case, the user needs to log in to the system of the H5 application being accessed. A successful login means that the authentication is successful, that is, the user has completed the login to the H5 system being accessed. The user information can be returned to the H5 application side. The H5 system can feed back the interface information to be displayed determined using the user information to the client, and the client can load the content of the interface information to be displayed into the webview component.

[0164] The web application access system provided by this solution can access the client by using login authentication as the user login verification web system. Application systems and applets that run independently through offline packages can be published in the client through the specified interface. Users do not need to enter usernames and passwords to log in to different web applications. The client logs in once, and all web applications connected to the client can be accessed without logging in. It has a wide range of adaptability. For enterprises, any web application that uses the enterprise unified login service as the user login can access the client. Offline package applications that run independently locally can also be accessed through interfaces and published in APP. In addition, the opening efficiency and access efficiency of using offline packages and webview are faster than the interface of online web applications, which can improve the access efficiency of web applications.

[0165] Based on the web application access method provided from the client perspective, an embodiment of the present invention further provides a web application access device, which is applied to a client, wherein a web view webview component is provided in the client, and a user agent UA for representing that the web page loading environment is a client environment is preset in the webview component; Figure 6 As shown, the device comprises:

[0166] The starting module 610 is used to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the specified interface after the target user successfully logs in; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application;

[0167] A first acquisition module 620 is used to acquire and save the UA in the started webview component;

[0168] The second acquisition module 630 is used to acquire the web page access address of the target web application;

[0169] The sending module 640 is used to send an access request for the target web application by loading the webpage access address of the target web application in the webview component, so that after receiving the access request, the target web application sends a specified authentication request for the client to a predetermined authentication server when it is detected that the sender of the access request has not logged in to the target web application, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when it is identified that the webpage loading environment represented by the UA is the client environment, detects whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client;

[0170] The display module 650 is used to load and display the interface information to be displayed for the target user of the target web application in the webview component.

[0171] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0172] Optionally, the sending module is further used for:

[0173] Using the target user's login information about the client, sending a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client;

[0174] Receiving and storing the target token;

[0175] The predetermined authentication server detects whether the client is in a logged-in state, including:

[0176] The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

[0177] Optionally, the sending module is specifically used for:

[0178] determining login information assigned to the target token;

[0179] The user name in the determined login information is used to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user.

[0180] Based on the web application access method provided from the perspective of the reservation authentication server, the embodiment of the present invention also provides a web application access device, which is applied to the reservation authentication server. The reservation authentication server is a server that communicates with at least one web application, such as Figure 7 As shown, the device comprises:

[0181] The receiving module 710 is used to receive a designated authentication request for a client sent by a target web application; wherein the designated authentication request is sent by the target web application to the predetermined authentication server when the target web application detects that the sender of the access request has not logged into the target web application after receiving the access request sent by the client; the access request is sent by the client after the target user successfully logs into the client and the client detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application;

[0182] The third acquisition module 720 is used to obtain a user agent UA from the client; wherein the UA is used to represent that the webpage loading environment is a client environment, and the UA is obtained and saved from the webview component after the client starts the webview component;

[0183] A detection module 730 is used to detect whether the client is in a logged-in state when identifying that the UA represents the webpage loading environment as a client environment;

[0184] The fourth acquisition module 740 is used to, if it is detected that the target user is in a logged-in state, use the user name in the login information of the target user on the client to obtain the user information to be used corresponding to the target web application for representing the target user, and feed back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feed back the interface information to be displayed to the client, so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

[0185] It can be seen that when accessing a web application, this solution does not require entering an account and password for each web application to log in, but instead detects whether the client is in a logged-in state to determine whether the target user has logged in to the target web application, thereby accessing the target web application. Therefore, this solution can achieve a one-time login for the client, and access to each web application without logging in, which can improve the access efficiency of web applications.

[0186] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.

[0187] Memory 803, used for storing computer programs;

[0188] The processor 801 is used to implement any web application access method when executing the program stored in the memory 803.

[0189] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0190] The communication interface is used for communication between the above electronic device and other devices.

[0191] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0192] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0193] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned web application access methods are implemented.

[0194] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any of the web application access methods in the above embodiments.

[0195] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0196] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0197] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0198] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A web application access method, characterized in that: Applied to a client, the client is provided with a web view component, and the web view component is preset with a user agent UA for representing that the web page loading environment is a client environment; the method comprises: After the target user successfully logs in, if it is detected that the target user clicks on the entrance of the target web application in the specified interface, the webview component is started; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application; Obtain and save the UA in the started webview component; Obtaining the web page access address of the target web application; In the webview component, by loading the webpage access address of the target web application, an access request for the target web application is sent, so that after receiving the access request, when the target web application detects that the sender of the access request has not logged in to the target web application, the target web application sends a specified authentication request for the client to a predetermined authentication server, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detects whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client; The interface information to be displayed for the target user of the target web application is loaded and displayed in the webview component.

2. The method according to claim 1, characterized in that In the webview component, before sending an access request to the target web application by loading the webpage access address of the target web application, the method further includes: Using the target user's login information about the client, sending a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client; Receiving and storing the target token; The predetermined authentication server detects whether the client is in a logged-in state, including: The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

3. The method according to claim 2, characterized in that The predetermined authentication server uses the user name in the login information of the target user on the client to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user, including: determining login information assigned to the target token; The user name in the determined login information is used to obtain the to-be-used user information corresponding to the target web application and used to characterize the target user.

4. A web application access method, characterized in that: Applied to a predetermined authentication server, the predetermined authentication server is a server communicating with at least one web application, the method comprising: Receive a designated authentication request for a client sent by a target web application; wherein the designated authentication request is sent by the target web application to the predetermined authentication server when it detects that the sender of the access request has not logged into the target web application after receiving the access request sent by the client; the access request is sent by the client after the target user successfully logs into the client and when it detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application; Obtaining a user agent UA from the client; wherein the UA is used to indicate that the webpage loading environment is a client environment, and the UA is obtained and saved from the webview component after the client starts the webview component; When identifying that the UA represents that the webpage loading environment is a client environment, detecting whether the client is in a logged-in state; If it is detected that the target user is in a logged-in state, the user name in the login information of the target user on the client is used to obtain the user information to be used corresponding to the target web application for representing the target user, and the user information to be used is fed back to the target web application so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and the interface information to be displayed is fed back to the client so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

5. A web application access system, characterized in that: It includes a client, a predetermined authentication server, and at least one web application; the client is provided with a web view component, and the webview component is preset with a user agent UA for representing that the web page loading environment is a client environment; The client is used to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the specified interface after the target user successfully logs in; Obtain and save the UA in the started webview component; Obtaining a webpage access address of the target web application; in the webview component, sending an access request for the target web application by loading the webpage access address of the target web application; wherein the designated interface is an interface of the client for displaying an access entrance of at least one web application, and the target web application is any one of the at least one web application; The target web application is used to, after receiving the access request, send a designated authentication request for the client to a predetermined authentication server when detecting that the sender of the access request is not logged into the target web application; The predetermined authentication server is used to obtain the UA from the client, and when recognizing that the webpage loading environment represented by the UA is a client environment, detect whether the client is in a logged-in state, and if it is detected that the client is in a logged-in state, obtain the user information to be used corresponding to the target web application and used to represent the target user by using the user name in the login information of the target user on the client, and feed back the user information to be used to the target web application; The target web application is further used to determine the interface information to be displayed of the target user represented by the user information to be utilized, and feed back the interface information to be displayed to the client; The client is also used to load and display the to-be-displayed interface information of the target web application for the target user in the webview component.

6. The system according to claim 5, characterized in that The client is also used to, in the webview component, load the webpage access address of the target web application, and before sending an access request to the target web application, use the login information of the target user about the client to send a token request for indicating that the client is in a logged-in state to the predetermined authentication server, so that the predetermined authentication server allocates a target token corresponding to the login information to the client; Receiving and storing the target token; The predetermined authentication server detects whether the client is in a logged-in state, including: The preset interface for obtaining token information for the client is called to obtain the target token from the client. If the target token is obtained, it is identified whether the target token is expired. If it is not expired, it is detected that the client is in a logged-in state.

7. A web application access device, characterized in that: Applied to a client, the client is provided with a web view component, and the web view component is preset with a user agent UA for representing that the web page loading environment is a client environment; the device comprises: A startup module, configured to start the webview component if it is detected that the target user clicks on the entrance of the target web application in the specified interface after the target user successfully logs in; wherein the specified interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is any one of the at least one web application; A first acquisition module is used to acquire and save the UA in the started webview component; A second acquisition module is used to acquire the web page access address of the target web application; a sending module, configured to send an access request for the target web application by loading the webpage access address of the target web application in the webview component, so that after receiving the access request, the target web application sends a specified authentication request for the client to a predetermined authentication server when detecting that the sender of the access request has not logged into the target web application, so that after receiving the specified authentication request, the predetermined authentication server obtains the UA from the client, and when recognizing that the webpage loading environment represented by the UA is the client environment, detects whether the client is in a logged-in state; if it is detected that the client is in a logged-in state, obtains the user information to be used corresponding to the target web application for representing the target user by using the user name in the login information of the target user on the client, and feeds back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feeds back the interface information to be displayed to the client; a display module, configured to load and display the interface information to be displayed for the target user of the target web application in the webview component.

8. A web application access device, characterized in that: Applied to a predetermined authentication server, the predetermined authentication server is a server communicating with at least one web application, the device comprises: A receiving module, configured to receive a designated authentication request for a client sent by a target web application; wherein the designated authentication request is sent by the target web application to the predetermined authentication server when it detects that the sender of the access request has not logged into the target web application after receiving the access request sent by the client; the access request is sent by the client after the target user successfully logs into the client and when it detects that the target user clicks on the entrance of the target web application in the designated interface, by loading the web access address of the target web application in the web view webview component; the designated interface is an interface of the client for displaying the access entrance of at least one web application, and the target web application is at least one of the at least one web application; the webview component is set in the client and is started after the client detects that the target user clicks on the entrance of the target web application; A third acquisition module is used to acquire a user agent UA from the client; wherein the UA is used to indicate that the webpage loading environment is a client environment, and the UA is acquired and saved from the webview component after the client starts the webview component; A detection module, configured to detect whether the client is in a logged-in state when recognizing that the UA represents that the webpage loading environment is a client environment; The fourth acquisition module is used to, if it is detected that the target user is in a logged-in state, use the user name in the login information of the target user on the client to obtain the user information to be used corresponding to the target web application for representing the target user, and feed back the user information to be used to the target web application, so that the target web application determines the interface information to be displayed of the target user represented by the user information to be used, and feed back the interface information to be displayed to the client, so that the client loads and displays the interface information to be displayed for the target user of the target web application in the webview component.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the web application access method described in any one of claims 1 to 4 when executing the program stored in the memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the web application access method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Account verification method

    CN102447670A

  • Authentication method for logging in application, client and server

    CN109962892A