CN117221400A - Application service access method, device, computer equipment and storage medium - Google Patents

Application service access method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117221400A
CN117221400A CN202211520261.7A CN202211520261A CN117221400A CN 117221400 A CN117221400 A CN 117221400A CN 202211520261 A CN202211520261 A CN 202211520261A CN 117221400 A CN117221400 A CN 117221400A
Authority
CN
China
Prior art keywords
application
service
page
login
webpage request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211520261.7A
Other languages
Chinese (zh)
Inventor
黄铁鸣
李斌
楼宏微
谢磊
陈育武
邓林升
农航亮
陈宪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202211520261.7A priority Critical patent/CN117221400A/en
Publication of CN117221400A publication Critical patent/CN117221400A/en
Pending legal-status Critical Current

Links

Abstract

The application relates to an application service access method, an application service access device, a computer device, a storage medium and a computer program product. The method comprises the following steps: after logging in with the target account, starting a webpage to request proxy service; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of a first application in an application page of a second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, the original page content of the target service in the first application is returned to the application page of the second application, and the application page is accessed to the application service.

Description

Application service access method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to an application service access method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of internet technology, applications of different demands are emerging. In order to facilitate the use of people, different applications can access each other.
In the related art, service access between different applications is realized by developing clients of the different applications. That is, for the accessed application, if other applications want to access the application to be accessed, the client corresponding to the other applications is required to call the client corresponding to the accessed application. However, once an application page related to other applications needs to perform service access on the accessed application, there is a problem that the application page cannot perform service access.
Disclosure of Invention
In view of the foregoing, it is desirable to provide an application service access method, apparatus, computer device, computer readable storage medium, and computer program product that enable application pages.
The application provides an application service access method which is applied to a first application. The method comprises the following steps:
After logging in with the target account, starting a webpage to request proxy service;
receiving a first webpage request sent by an embedded object created by an application page of a second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
sending the first webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
The application also provides an application service access device. The device comprises:
the first opening module is used for opening a webpage to request proxy service after logging in with a target account;
The first receiving module is used for receiving a first webpage request sent by an embedded object created by an application page of the second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
the first sending module is used for sending the first webpage request and login state information of the target account to a first application server;
and the first return module is used for returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page if the first application receives a response of the first application server, which is successfully checked according to the check information carried by the first webpage request and the login state information.
The application also provides computer equipment. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
After logging in with the target account, starting a webpage to request proxy service;
receiving a first webpage request sent by an embedded object created by an application page of a second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
sending the first webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
The application also provides a computer readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
After logging in with the target account, starting a webpage to request proxy service;
receiving a first webpage request sent by an embedded object created by an application page of a second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
sending the first webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
The application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
After logging in with the target account, starting a webpage to request proxy service;
receiving a first webpage request sent by an embedded object created by an application page of a second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
sending the first webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
The application business access method, the device, the computer equipment, the storage medium and the computer program product are used for requesting proxy service by starting a webpage after logging in with a target account; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, the webpage request carries verification information required by the second application for accessing the target service, and the verification information is obtained by the second application from the first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
The application provides an application information access method which is applied to a first application. The method comprises the following steps:
after logging in with the target account, starting a webpage to request proxy service;
receiving a second webpage request sent by a login component created by a second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
sending the second webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server according to the second webpage request and the login state information, returning the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application by the target account.
The application also provides an application information access device. The device comprises:
the second opening module is used for opening the webpage to request proxy service after logging in with the target account;
the second receiving module is used for receiving a second webpage request sent by the login component created by the second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
The second sending module is used for sending the second webpage request and login state information of the target account to the first application server;
and the second return module is used for returning the account information of the target account to the login component created by the application page of the second application if the first application receives the response of the first application server according to the second webpage request and the login state information, so as to instruct the login component to display a login interface for logging in the second application by the target account.
The application also provides computer equipment. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
after logging in with the target account, starting a webpage to request proxy service;
receiving a second webpage request sent by a login component created by a second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
sending the second webpage request and login state information of the target account to a first application server;
And if the first application receives a response of the first application server according to the second webpage request and the login state information, returning the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application by the target account.
The application also provides a computer readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
after logging in with the target account, starting a webpage to request proxy service;
receiving a second webpage request sent by a login component created by a second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
sending the second webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server according to the second webpage request and the login state information, returning the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application by the target account.
The application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
after logging in with the target account, starting a webpage to request proxy service;
receiving a second webpage request sent by a login component created by a second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
sending the second webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server according to the second webpage request and the login state information, returning the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application by the target account.
The application information access method, the device, the computer equipment, the storage medium and the computer program product are used for requesting proxy service by starting a webpage after logging in with a target account; receiving a second webpage request sent by a login component created by a second application through a webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not; sending a second webpage request and login state information of the target account to a first application server; if the first application receives a response of the first application server according to the second webpage request and the login state information, the account information of the target account is returned to the login component created by the application page of the second application, so that the login component is indicated to display a login interface for logging in the second application by the target account. In this way, when the first application is in the login state, the first application can receive the second webpage request sent by the login component created by the application page of the second application through the opened webpage request proxy service, and the first application can send the second webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the application page is enabled to perform efficient application service access.
The application provides an application service access method. The method comprises the following steps:
creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
receiving the first webpage request through a webpage request proxy service started by the first application when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
and after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application, returning the original page content of the target service in the first application to the application page of the second application.
The application also provides an application service access device. The device comprises:
The creation module is used for creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
the third sending module is used for sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
the third sending module is configured to receive, by using a web page request proxy service that is started when the first application is in a login state, the first web page request, and send the first web page request and login state information of the first application to a first application server;
and the third return module is used for returning the original page content of the target service in the first application to the application page of the second application after receiving a response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application.
The application also provides computer equipment. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
receiving the first webpage request through a webpage request proxy service started by the first application when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
and after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application, returning the original page content of the target service in the first application to the application page of the second application.
The application also provides a computer readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
receiving the first webpage request through a webpage request proxy service started by the first application when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
and after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application, returning the original page content of the target service in the first application to the application page of the second application.
The application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
receiving the first webpage request through a webpage request proxy service started by the first application when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
and after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application, returning the original page content of the target service in the first application to the application page of the second application.
The application service access method, the device, the computer equipment, the storage medium and the computer program product establish an embedded object aiming at the target service through the application page of the second application; the embedded object is used for accessing a target service of the first application in the application page; sending a first webpage request to a first application through an embedded object, wherein the first webpage request carries verification information required by a second application to access a target service, and the verification information is obtained by the second application from a first application server; receiving a first webpage request through a webpage request proxy service which is started when a first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server; and returning the original page content of the target service in the first application to the application page of the second application after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
Drawings
FIG. 1 is an application environment diagram of an application business access method in one embodiment;
FIG. 2 is a flow diagram of an application business access method in one embodiment;
FIG. 3A is a diagram of a native selector interface of a selector service in one embodiment;
FIG. 3B is a schematic diagram of an application page for the completion of a selector service in an embodiment;
FIG. 4A is a diagram of a native sharing interface for sharing a business in one embodiment;
FIG. 4B is a diagram of an application page sharing business completion in one embodiment;
FIG. 5 is a schematic flow diagram of a selector service in one embodiment;
FIG. 6A is a schematic diagram of an interface for a failed selector service in one embodiment;
FIG. 6B is a schematic diagram of an interface for a failed option service in another embodiment;
FIG. 6C is a schematic diagram of an interface for a failed option service in another embodiment;
FIG. 6D is a schematic diagram of an interface for a failed selector service in another embodiment;
FIG. 7 is a flow diagram of sharing a service in one embodiment;
FIG. 8A is a schematic diagram of an interface for sharing a business failure in one embodiment;
FIG. 8B is an interface diagram of another embodiment of a failed sharing service;
FIG. 9 is a flow diagram of a method of application information access in one embodiment;
FIG. 10A is a schematic diagram of a quick login interface in one embodiment;
FIG. 10B is a diagram of a login interface for quick login in another embodiment;
FIG. 11 is a schematic diagram of a successful login of a second application in one embodiment;
FIG. 12 is a flow diagram of a login service in one embodiment;
FIG. 13 is a flow chart of a login service according to another embodiment;
FIG. 14A is a diagram of a login interface for a scan code login, in one embodiment;
FIG. 14B is a diagram of a login interface for a scan code login in another embodiment;
FIG. 15 is a flowchart of another embodiment of a method for accessing an application service;
FIG. 16 is a block diagram of an application service access apparatus in one embodiment;
FIG. 17 is a block diagram of an application information access device in one embodiment;
FIG. 18 is a block diagram of an application service access apparatus in another embodiment;
fig. 19 is an internal structural view of the computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
For ease of understanding, the related concepts will first be explained.
Third party facilitator: providing service providers for application development, software and hardware solutions, etc.
Self-building application: applications created by themselves in the enterprise, such as HR (Human Resources) assistants in the enterprise.
Scanning codes and logging: and using the mobile terminal application to scan the login two-dimensional code for login. .
Quick login: after the first application at the desktop end logs in, the web browser can click a button to directly log in.
Scheme a: the browser calls the uri (Uniform Resource Identifier ) of the client, such as wxwork://.
HTTPS service: an encrypted HTTP (Hyper Text Transfer Protocol ) request sent by a web page.
corpId: the enterprise ID of the current user is generated after the enterprise is created, and is permanently valid and globally unique.
authCode: the code (credential) returned to the service after successful login can be understood as a temporary authorization credential, and the API (Application Programming Interface ) obtains user information according to the temporary authorization credential.
webToken: the user identity (enterprise+application+user) is marked by an interface call certificate, which is generated after the authCode is consumed.
Calllid: the id (Identity document, identification number) of each operation of the user records the status and the operation result.
jsapi_signature: a JSAPI (JSAPI) signature is generated from url (uniform resource locator, uniform resource locator system) generated by hashing parameters to identify the source of page legitimacy.
In the related art, for service access between different applications, for example, service access is performed on a first application by a second application, due to the problem of data and interface security, a related interface of the first application cannot be provided on an application page of the second application, that is, corresponding service access on the first application by the application page of the second application cannot be realized.
According to the application service access method provided by the embodiment of the application, after logging in by the target account, a webpage is opened to request proxy service; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, the webpage request carries verification information required by the second application for accessing the target service, and the verification information is obtained by the second application from the first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
The application service access method provided by the embodiment of the application can be applied to the application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. Wherein the first application and the second application are deployed on the terminal 102. Of course, the first application and the second application are two different applications.
In one embodiment, after a first application in the terminal 102 logs in with a target account, a web page is opened to request proxy services; receiving a first webpage request sent by an embedded object created by an application page of a second application in the terminal 102 through a webpage request proxy service; the embedded object is used for accessing a target service of a first application in an application page of a second application in the terminal 102, and the webpage request carries verification information required by the second application in the terminal 102 for accessing the target service, wherein the verification information is obtained by the second application in the terminal 102 from a first application server 104; sending a first webpage request and login state information of a target account to a first application server 104; if the first application in the terminal 102 receives a response that the first application server 104 successfully verifies the verification information and the login state information according to the verification information carried by the first web page request, the original page content of the target service in the first application in the terminal 102 is returned to the application page of the second application in the terminal 102, so that the target service is accessed in the application page.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The first application server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, an application service access method is provided, and the method is applied to the first application in the terminal 102 in fig. 1 for illustration, and includes the following steps:
step 202, after logging in with the target account, opening the webpage to request proxy service.
And associating the target account with a corresponding enterprise, wherein the target account is an account of the first application. Alternatively, the first application may be a social application, a payment application, a video application, a gaming application, or the like. For example, the social application may be an instant messaging application, a live application, etc., without limitation in particular. The web page request proxy service is used for realizing communication between the first application server and the first application and the second application in the terminal, and therefore, starting the web page request proxy service means developing communication capability between the first application server and the first application and the second application in the terminal. Alternatively, the web page request proxy service is an http (Hyper Text Transfer Protocol ) service. Alternatively, to ensure the security of the communication, the secure communication between the first application server, the first application in the terminal and the second application may be implemented using an encrypted http protocol (i.e. https protocol).
Optionally, after the first application in the terminal logs in with the target account, starting the webpage to request the proxy server. The first application in the terminal is an application of a desktop client. After a first application of the desktop client logs in by a target account, the desktop client starts a webpage to request proxy service.
For example, the desktop client of the instant messaging application logs in with the target account, that is, the login state of the desktop client of the instant messaging application is that the target account is logged in, and the desktop client of the instant messaging application opens a local webpage to request proxy service.
Step 204, receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from the first application server.
The second application may be a self-built application or a third party application. For an enterprise associated with the target account, the second application may be a self-built application built by the enterprise, or the second application may be a third party application created by a third party service provider for the enterprise. The second application may be a web application.
The embedded object is placed in a designated area in the application page, and is used for accessing the target service of the first application in the application page of the second application, namely, calling a native interface corresponding to the target service in the first application to access the target service of the first application in response to a trigger event corresponding to the target service in the application page. Optionally, the target service is a selection service, the second application calls information of the selection service, that is, calls a primary selection interface in the first application, and the user clicks a selection button in the application page, so that the area where the selection button is located is an area where an embedded object corresponding to the selection service is placed. Optionally, the target service is a sharing service, the second application calls information of the sharing service, that is, calls a native sharing interface in the first application, and the user clicks a sharing button in the application page, where the area where the sharing button is located is an area where an embedded object corresponding to the sharing service is placed. Alternatively, the embedded object is an iframe (i.e., HTML (Hyper Text Markup Language tag, hypertext markup language tag).
Optionally, when the embedded object detects a trigger event for the embedded object, the second application acquires verification information from the first application server, the embedded object created by the application page of the second application sends a first webpage request carrying the verification information to the first application, and the first application receives the first webpage request sent by the embedded object created by the application page of the second application through a webpage request proxy service. The triggering event is that a user clicks a button corresponding to a target service, and an embedded object corresponding to the target service is placed in an area where the button is located.
When a user clicks a button corresponding to a target service, and an embedded object placed in an area where the button is located detects a trigger event for the embedded object, a second application obtains verification information from a first application server, an embedded object created by an application page of the second application sends a first webpage request carrying the verification information to the first application, the first application requests proxy services through the webpage, and the first application receives the first webpage request sent by the embedded object created by the application page of the second application.
For example, when a user clicks a selector button corresponding to a selector service, when an embedded object placed in an area where the selector button is located detects a trigger event for the embedded object, a second application obtains verification information corresponding to the selector service from a first application server, an embedded object created by an application page of the second application sends a first webpage request carrying the verification information to the first application, the first webpage request is a request corresponding to the selector service, the first application requests proxy services through the webpage request, and receives a first webpage request corresponding to the selector service sent by the embedded object created by the application page of the second application.
For another example, when a user clicks a sharing button corresponding to a sharing service, when an embedded object placed in an area where the sharing button is located detects a trigger event for the embedded object, a second application obtains verification information corresponding to the sharing service from a first application server, an embedded object created by an application page of the second application sends a first webpage request carrying the verification information to the first application, the first webpage request is a request corresponding to the sharing service, and the first application receives, through a webpage request proxy service, the first webpage request corresponding to the sharing service sent by the embedded object created by the application page of the second application.
Step 206, sending the first web page request and the login state information of the target account to the first application server.
The login state information characterizes whether the target account is logged in or not, and comprises information that the target account is logged in and information that the target account is not logged in.
Optionally, the first application obtains login state information of the target account, and the first application sends a first webpage request corresponding to the target service and the login state information of the target account to the first application server.
Step 208, if the first application receives a response to the success of the verification information and the login state information carried by the first web page request by the first application server, returning the original page content of the target service in the first application to the application page of the second application, so as to access the target service in the application page.
Optionally, the first application server receives the login state information of the first webpage request and the target account, the first application server performs verification according to the login state information and the verification information in the first webpage request, if the verification result represents that the verification is successful, the first application server sends a response to the first application, and the first application returns the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. And if the verification result represents that the verification is successful, the first webpage request is a legal request.
The target service is exemplified as a person selecting service, the first application server receives a first webpage request corresponding to the person selecting service and login state information of the target account, and the first application server performs verification according to the login state information and verification information in the first webpage request. If the verification result corresponding to the person selecting service represents that verification is successful, the first application server sends a response to the first application, and the first application returns the original person selecting interface content of the target service in the first application to an application page of the second application so as to access the person selecting service in the application page. The native human interface includes at least one user, or at least one message group, of an enterprise associated with the target account.
Optionally, the target service is a sharing service, the first application server receives a first webpage request corresponding to the sharing service and login state information of the target account, and the first application server performs verification according to the login state information and verification information in the first webpage request. If the verification result corresponding to the sharing service represents that verification is successful, the first application server sends a response to the first application, and the first application returns the original sharing interface content of the target service in the first application to an application page of the second application so as to send the sharing link corresponding to the sharing button to the original sharing interface. The shared link reveals an identity of the second application, or a name of the second application, or an identity and a name of the second application.
According to the application business access method, after logging in by the target account, a webpage is started to request proxy service; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, the webpage request carries verification information required by the second application for accessing the target service, and the verification information is obtained by the second application from the first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
In one embodiment, the step of creating the embedded object for the application page of the second application comprises: calling an embedded object creation interface of the first application server through the second application according to the service interface name of the target service and the service interface calling parameter of the target service, wherein the service interface calling parameter comprises the drawing parameter of the embedded object; receiving an embedded object drawn and returned by a first application server according to drawing parameters; and displaying the embedded object in an application page of the second application.
Optionally, through sdk (Software Development Kit ) in the second application, the embedded object creation interface of the first application server is invoked according to the service interface name of the target service and the interface call parameter of the target service. The embedded object creation interface is used for indicating the first application server to draw the embedded object according to the drawing parameters. The sdk in the second application receives the embedded object drawn by the first application server, and sdk in the second application returns the embedded object to the application page of the second application, and displays the embedded object in the application page of the second application.
Exemplary, the target services include a selection service and a sharing service. For the selector service, calling an embedded object creation interface corresponding to the selector service of the first application server according to the service interface name SelectEnterprise contact of the selector service and the interface calling parameter of the target service through sdk in the second application. The embedded object creation interface corresponding to the person selection service is used for indicating the first application server to draw the embedded object corresponding to the person selection service according to the drawing parameters. The sdk in the second application receives the embedded object corresponding to the person selecting service drawn by the first application server, sends the embedded object corresponding to the person selecting service to an application page of the second application, and displays the embedded object in the application page of the second application. And for the sharing service, calling an embedded object creation interface corresponding to the sharing service of the first application server according to the service interface name shareapplemessage of the sharing service and the interface calling parameter of the target service through sdk in the second application. The embedded object creation interface corresponding to the sharing service is used for indicating the first application server to draw the embedded object corresponding to the sharing service according to the drawing parameters. The sdk in the second application receives the embedded object corresponding to the sharing service drawn by the first application server, sends the embedded object corresponding to the selector service to an application page of the second application, and displays the embedded object in the application page of the second application.
In this embodiment, the second application is used to call the embedded object creation interface of the first application server according to the service interface name of the target service and the service interface call parameter of the target service, where the service interface call parameter includes the drawing parameter of the embedded object; and receiving the first application server to draw the embedded object according to the drawing parameters, so that the embedded object matched with the target service requirement can be obtained. And then, returning the embedded object and displaying the embedded object in an application page of the second application, so that a user can trigger an operation corresponding to the target service according to the displayed embedded object.
In one embodiment, before the application page of the second application creates the embedded object, the method further includes a step of obtaining an authentication parameter by the second application, the step including: and obtaining an authentication parameter of the second application from the first application server according to the current account through the second application logged in by the current account, wherein the authentication parameter is used for indicating at least one of an enterprise identifier of an enterprise associated with the current account, an application identifier authorized by the associated enterprise or a visible range of the second application.
Optionally, before the application page of the second application creates the embedded object corresponding to the target service, acquiring, by the second application logged in with the current account, an authentication parameter of the second application corresponding to the current account from the first application server according to the current account. The authentication parameter is used for checking whether the first webpage request is a legal request, and if each sub-parameter in the authentication parameter is an authorized parameter, determining that the authentication parameter is the legal authentication parameter. If one of the authentication parameters is not authorized, determining that the authentication parameter is not legal, and further determining that the first webpage request is not legal according to the authentication parameter which is not legal. The authentication parameter comprises at least one sub-parameter, and the sub-parameter can be an enterprise identifier of an enterprise associated with the current account, an application identifier authorized by the associated enterprise, or a visible range of the second application.
When the target service is a person selecting service, the current account number of the second application is the target account number, that is, the target account number of the first application logs in the second application before the second application page creates the embedded object corresponding to the person selecting service. At this time, according to the current account, the second application obtains, from the first application server, an authentication parameter (namely, agentConfigParams) corresponding to the person selecting service of the second application corresponding to the current account. The authentication parameters corresponding to the person selecting service are used for indicating at least one of enterprise identification of an enterprise associated with the current account, application identification authorized by the associated enterprise or a visible range of the second application. If the second application is a self-built application, the application identifier is a self-built application identifier, and if the second application is a third party application created by a third party server, the application identifier is third party application information, and at this time, the authentication parameters corresponding to the person selecting service may further include server information of the third party server.
In an exemplary embodiment, when the target service is a sharing service, before the second application creates the embedded object corresponding to the sharing service, the second application may log in the target account or may not log in the target account, and in this embodiment, the second application logs in the target account specifically: the current account of the second application is a target account, i.e. the target account of the first application logs in the second application. At this time, according to the current account, the second application obtains, from the first application server, an authentication parameter (that is, agentConfigParams) corresponding to the sharing service of the second application corresponding to the current account. The authentication parameter corresponding to the sharing service is used for indicating at least one of enterprise identification of an enterprise associated with the current account, application identification authorized by the associated enterprise or a visible range of the second application. If the second application is a self-built application, the application identifier is a self-built application identifier, and if the second application is a third party application created by a third party server, the application identifier is third party application information, and at this time, the authentication parameters corresponding to the sharing service may further include server information of the third party server.
It should be noted that, if the second application does not log in the target account, the second application obtains an authentication parameter (i.e. sumiteConfigParams) corresponding to the sharing service, where the authentication parameter is used to indicate a page identifier of the application page. If the page identifier indicates that the application page is an authorized page, that is, the page identifier of the application page of the third-party service provider is a registered legal page, determining that the authentication parameter is a legal authentication parameter. If the page identifier indicates that the application page is not an authorized page, determining that the authentication parameter is not a legal authentication parameter, and further determining that the first webpage request is not a legal request according to the authentication parameter which is not legal.
In this embodiment, before the embedded object is created on the application page of the second application, the authentication parameter needs to be acquired through the second application, that is, the second application logged in by the current account can accurately acquire the authentication parameter of the second application according to the current account, so that the verification information carried by the first webpage request is effectively verified, and the validity of the target service accessed in the application page is ensured.
In one embodiment, the step of sending the first web page request through the embedded object includes: when the embedded object detects a trigger event aiming at the embedded object, the embedded object requests verification information to the second application, wherein the verification information comprises interface call credentials and authentication parameters required by the second application to access an interface of the first application server; and requesting the first webpage request initiated by the proxy service from the webpage of the first application according to the verification information through the embedded object.
Optionally, when the embedded object detects a trigger event for the embedded object, verification information is requested from sdk in the second application by the embedded object. Sdk in the second application sends the verification information to the embedded object. And requesting the first webpage request initiated by the proxy service from the webpage of the first application according to the verification information through the embedded object.
Illustratively, when the embedded object corresponding to the target service detects a trigger event for the embedded object, verification information is requested from sdk corresponding to the target service in the second application through the embedded object. Sdk in the second application, which corresponds to the target service, sends the verification information to the embedded object. And the embedded object requests a first webpage initiated by the desktop client where the first application is located according to the interface parameters and the verification information corresponding to the target service. That is, the first web page request carries the interface parameter and the verification information. Wherein, prior to creating the embedded object corresponding to the target service, the second application initializes sdk corresponding to the target service such that sdk corresponding to the target service obtains the verification information.
For example, when a user clicks a button corresponding to a target service, when an embedded object placed in an area where the button is located detects a trigger event for the embedded object, verification information is requested from sdk (Software Development Kit ) in the second application through the embedded object, where the verification information includes interface call credentials (Webtoken) and authentication parameters required for the second application to access an interface of the first application server. Sdk in the second application corresponding to the target service sends an interface call credential (Webtoken) and an authentication parameter (agentconfigParams) required by the second application to access the interface of the first application server to the embedded object. The embedded object determines a first webpage request according to an interface call certificate (Webtoken) and an authentication parameter (agentconfigparameters), and sends the first webpage request and the interface parameter (Invoke JSAPI) to a desktop client where the first application is located. That is, the first web page request carries the interface call certificate and the authentication parameter. In this example, the application page is in a login state, that is, the target account number is logged in the application page.
In this embodiment, when the embedded object detects a trigger operation for the embedded object, the embedded object can request verification information from the second application, and generate a first web page request initiated to a web page request proxy service of the first application according to an interface call credential and an authentication parameter in the verification information. Therefore, the validity of the first webpage request can be checked in time, and the validity of the target service accessed in the application page can be ensured.
In one embodiment, sending the login state information of the first webpage request and the target account to the first application server includes: forwarding a first webpage request and login state information of a target account to a first application server under the condition that a first application is logged in by the target account; and under the condition that the first application is in an unregistered state, skipping from the second application to the first application to execute login operation, returning to the second application after the first application logs in the target account, and sending a first webpage request and login state information of the target account to the first application server.
Optionally, when the first application is logged in with the target account, forwarding the first web page request and login state information of the target account to the first application server. And under the condition that the first application is in an unregistered state, skipping from the second application to the first application to execute a login operation, starting a webpage request proxy service after the target account number of the first application is logged in, returning to the second application, and sending a first webpage request and login state information of the target account number to the first application server through the webpage request proxy service by an embedded object created by an application page of the second application.
It should be noted that, in this embodiment, after the first application receives the first web page request, the login state of the first application is still the logged-in state, that is, the first application is logged in with the target account. Meanwhile, the first application may also have a situation that the target account is not logged in, for example, the terminal is suddenly restarted, or the terminal is suddenly disconnected, where the first application is in an unregistered state, and needs to jump to the first application to log in the target account again, and restart the webpage to request proxy service.
In an exemplary embodiment, when the first application is logged in by the target account, the desktop client where the first application is located forwards the first web page request and login state information of the target account to the first application server. And under the condition that the first application is in an unregistered state, skipping from the second application to the first application to execute a login operation, after the first application logs in by the target account, starting a webpage request proxy service by a desktop client of the first application, returning to the second application, and sending a first webpage request and login state information of the target account to the first application server by an embedded object created by an application page of the second application through the webpage request proxy service.
In this embodiment, in the process that the first application communicates with the first application server, if the first application is logged in with the target account, it is determined that the proxy service is opened for the current web request, so that the login state information of the first web request and the target account is directly forwarded to the first application server. If the first application changes from the logged-in state to the unregistered state due to the abnormal condition, in order to ensure that the first webpage request and the login state information of the target account number are sent to the first application server, the first application needs to be logged in again, after the first application logs in with the target account number, the second application is returned, and the first webpage request and the login state information of the target account number are sent to the first application server again. Therefore, the first application server can timely and efficiently receive the first webpage request and the login state information of the target account.
In one embodiment, the login state information of the target account includes the target account and an enterprise identifier of an enterprise associated with the target account; the verification information comprises authentication parameters; the step of verifying the login state information by the first application server according to the verification information carried by the first webpage request comprises the following steps: inquiring authorization information corresponding to the enterprise identifier through the first application server under the condition that the first application server receives the first webpage request and the login state information; and if the authentication parameters are matched with the authorization information, returning a response of successful verification to the first application.
Optionally, under the condition that the first application server receives the first webpage request and the login state information, determining an enterprise identifier of an enterprise associated with the target account, and querying authorization information corresponding to the enterprise identifier by the first application server. And the first application server judges whether the authentication parameter is matched with the authorization information according to the authentication parameter and the authorization information. If the authentication parameter is matched with the authorization information, the first application server returns a response to the first application, wherein the response is successfully checked.
If the authentication parameter is not matched with the authorization information, the first application server returns error information to the first application, the first application returns the error information to the embedded object, the embedded object returns the error information to the application page through a function of a failure callback, and the process is ended.
In this embodiment, the first application server compares the authentication parameter with the authorization information, so as to reflect whether the current authentication parameter is matched with the authorization information, thereby ensuring that the target service performed later is legal.
In one embodiment, the method further comprises a step of triggering the target service in the application page, the step comprising: and displaying the original page content of the target service through the application page of the second application, and triggering the execution of the target service in the application page in response to the triggering operation of the original page content.
Optionally, after the first application returns the native page content of the target service in the first application to the application page of the second application, the target service is triggered in the application page. That is, the native page content of the target service is presented through the application page of the second application. And responding to the triggering operation of the content of the original page, and triggering the execution of the target service in the application page.
The target service is triggered in an application page of a second application after the first application returns the native page content of the target service in the first application to the application page of the second application. The embedded object obtains a transaction identifier sent by the first application, the transaction identifier is generated by the first application server when the first application server evokes the original page content, and the first application server sends the transaction identifier to the first application. The transaction identifier records the execution state and the execution result when the target service is executed when the user triggers the operation of the original page content. The transaction identifier is used for querying an execution result corresponding to the target service.
The embedded object polls the execution result by sending the transaction identification to the first application. Specifically, the embedded object transmits the transaction identifier to the first application, and the first application transmits the transaction identifier to the first application server. The first application server inquires an execution result corresponding to the target service according to the transaction identifier and returns the execution result to the first application, the first application returns the execution result to the embedded object, the embedded object exits polling according to the received execution result and returns the execution result to sdk of the second application, and sdk of the second application returns the execution result to an application page of the second application by calling a function. If the first application server does not inquire the execution result corresponding to the target service, that is, the embedded object does not receive the execution result, the embedded object waits for a period of time until the execution result is received.
Illustratively, as shown in fig. 3A, a schematic diagram of a native selector interface for a selector service is provided. In fig. 3A, the application page of the second application is in a logged-on state, i.e., the logged-on target account number is small. The second application is OKR (Objectives and Key Results, goal and key achievement method), and three key results (i.e., KR1 to KR 3) corresponding to the target account number are displayed in an application page of the second application. Clicking the selection icon can display a primary selection interface of the first application, namely 'first application and selection contact', wherein the primary selection interface is provided with a selection range, can select from group chat, can select from specific item groups, can select contacts from a product design center, a search product center and a product design center, can directly search in a search box to select contacts, can select a troops in an enterprise associated with a target account through the search box, can click to confirm after the selection business is completed, and can click to cancel the current selection business. As shown in fig. 3B, a schematic diagram of an application page for the completion of the selector service is shown. The application page displays that the current alignment target of the target account is the army, and further, after the selected person service is completed, the application page of the second application acquires the selected department identifier and the identifier open_userid of the contact person in the selected person service. At the same time, the first application closes the native human interface.
Exemplary, as shown in fig. 4A, a schematic diagram of a native sharing interface for sharing a service in one embodiment is shown. In fig. 4A, the application page of the second application is in a logged-on state, i.e., the logged-on target account number is small. The second application is OKR (Objectives and Key Results, goal and key achievement method), and three key results (i.e., KR1 to KR 3) corresponding to the target account number are displayed in an application page of the second application. The application page displays a primary sharing interface of the first application, namely 'first application and selection chat', wherein the primary sharing interface is set with a sharing range, can select from the existing group chat, can also create a new chat, and can select the chat needing to be forwarded. For example, a designed large group of first applications is selected as the chat that needs to be forwarded. At this time, the identification of the second application to which the link belongs will be given. After the sharing service is finished, the user clicks to confirm, or clicks to cancel the current sharing service. As shown in fig. 4B, a schematic diagram of an application page for sharing business completion is shown. The application page invokes a first application chat page with a target login account of small brightness. And sending the link shared by the mins to the first application chat page and staying on the first application chat page. The first application chat page presents historical messages and presents a group of chat that need to be forwarded: designing a large group. The group of the design large group is a xiaoming, the xiaoming invites the xiaojun and xiaohong belonging to the same enterprise to join the group chat, as group members, a link shared by the second application is displayed in the group, the link is OKR of the xiaoming, and the application identifier of the second application from which the link originates is also displayed in the link.
In this embodiment, the application page of the second application displays the native page content of the target service, and in response to the triggering operation on the native page content, the execution of the target service can be quickly triggered in the application page, so as to ensure that the target service can be timely and accurately executed, and improve the efficiency of executing the target service.
The following will respectively introduce the specific processes of the selection service and the sharing service.
For the selection business, as shown in fig. 5, a flow diagram of the selection business is shown. The application page of the second application initializes sdk corresponding to the selector service, i.e. registers getagentconfigugsignaling by calling ww.register, and obtains the authentication parameter agentconfigugparams by getagentconfigugsignaling. If the application page does not receive the error prompt corresponding to the selected service, calling a sdk interface (i.e. sdkapi: ww. CreateJSAPINAme) to sdk corresponding to the selected service, requesting sdk corresponding to the selected service to render an embedded object (i.e. invisible iframe) corresponding to the selected service from a Node (running environment), rendering the embedded object according to a service interface call parameter corresponding to the selected service by the Node, obtaining the embedded object by the application page of the second application, and placing the embedded object in a certain area of the application page to obtain a selected button, wherein the service interface call parameter of the selected service is used for determining the attribute of the embedded object corresponding to the selected service, and the service interface call parameter is as shown in the following table 1:
Table 1 service interface call parameter table for selected service
The relevant definitions of the above jsapi parameters are shown in table 2 below:
table 2JSAPI parameter table
/>
The meanings of the above-mentioned InnerStyle parameters are shown in Table 3:
TABLE 3InnerStyle parameter Table
Parameter name Type(s) Must be filled with Description of the invention
cursor string Whether or not css cursor style
After the above is accepted, after the selection button is displayed on the application page, a triggering process is performed as follows, specifically, after the user clicks the selection button, when the embedded object corresponding to the selection service detects a triggering event for the embedded object, verification information is requested to sdk in the second application through the embedded object, where the verification information includes an interface call credential (Webtoken) and an authentication parameter required by the second application to access the interface of the first application server. Sdk corresponding to the selector service in the second application sends an interface call certificate (Webtoken) and an authentication parameter (agentconfigParams) required by the second application to access the interface of the first application server to the embedded object, the embedded object determines verification information according to the interface call certificate (Webtoken) and the authentication parameter (agentconfigParams), determines a first webpage request according to the verification information, and sends the first webpage request and the interface parameter (Invoke API) to a desktop client where the first application is located. The desktop client transparently passes the first web page request and interface parameters (Invoke JSAPI) to a first application server. The first application server also receives login state information, wherein the login state information characterizes the link of the desktop client, namely the link of the desktop client and the first application server mutually transmitting information, and the login state information comprises a target account number and an enterprise identifier of an enterprise associated with the target account number. The first application server queries authorization information corresponding to the enterprise identifier. If the authorization information is not matched with the authentication parameters, checking is failed, returning error information to the first application, the first application returns the error information to the embedded object, the embedded object returns the error information to the application page by checking that the corresponding call failure callback function is not passed, and ending the current selection process. Or if the user account corresponding to the interface call credential is not the target account, the interface call credential is not an authorized credential. If the interface call certificate is not an authorized certificate or the authorization information is not matched with the authentication parameters, checking is failed, returning error information to the first application, returning the error information to the embedded object by the first application, returning the error information to the application page by the embedded object through checking without the corresponding call failure callback function, and ending the current selection process. For example, as shown in fig. 6A, an interface diagram of a failed option service in one embodiment is shown. And displaying an error sub-page in the application page under the condition that the user account corresponding to the interface call certificate is not the target account, namely, displaying error information about the error sub-page of the first application and the selected contact person, namely, that the account is inconsistent, namely, that the user account xiao Hua in the application page is not the target account, prompting to check whether the user account logged in the application page is consistent with the target account of the first application in the desktop client, and displaying an enterprise to which the current user account belongs, such as an enterprise A.
As further shown in fig. 6B, an interface diagram of a failed option service in another embodiment is shown. Under the condition that the authorization information is not matched with the authentication parameters, the fact that the user account in the application page is not authorized, namely not in the visible range, is indicated that an error sub-page, namely an error sub-page related to the first application and the selected contact person, is displayed in the application page, the error sub-page displays error information, namely unauthorized information, prompts an enterprise administrator requesting to contact an enterprise associated with the first application, and simultaneously displays an enterprise to which the current user account belongs, such as an A enterprise. In addition, the first application server determines the current version number of the first application according to the authorization information, and if the current version number does not support the selector service, an error sub-page, namely an error sub-page related to the first application and the selected contact, is displayed in the application page, and the error sub-page also prompts error information.
FIG. 6C is a schematic diagram of an interface for a failed option service in another embodiment. At this time, directly display "your first application version is too low, please upgrade to use after the latest version of the first application, upgrade path: the first application is on the desktop client-top left head portrait-about-check update "to guide the user to update the version. If the authorization information is matched with the authentication parameters, checking is passed, and a response of successful checking is returned to the first application. Or the user account corresponding to the interface call credential is the target account, and the interface call credential is the authorized credential. If the interface call credential is an authorized credential and the authorization information is matched with the authentication parameter, the verification is passed, and the first application server returns a response to the first application, namely a native popup window of the selector (namely a native selector interface) is evoked, and a transaction identifier (namely a calild) corresponding to a selector service is generated. If the native popup window is not successfully evoked within a preset time period, the application page also displays an error prompt, as shown in fig. 6D, which is an interface schematic diagram of the failed option service in another embodiment. At this time, an error sub-page, i.e., an error sub-page about the first application, select contact, is displayed in the application page, which will display "open the first application. At this time, the information of "if you have not installed the first application, please download and install first" is also prompted, at this time, if the first application is not downloaded and installed, then "download and install" in the application page is clicked, and then the download page of the first application is opened on the new tab page. And if the first application displays the native popup in the application page of the second application within the preset time period. After the first application successfully evokes the native popup window, the transaction identifier is returned to the embedded object corresponding to the selector service. The user performs the operation of selecting the person in the native popup of the person, after the operation is completed, a click confirm button or a cancel button is triggered in a native popup window provided by the first application, the first application responds to the operation of triggering the click confirm button or the cancel button, an execution result corresponding to the service of selecting the person is determined, and the execution result is returned to the first application server through the transaction identifier. In the process, the embedded object corresponding to the person selecting service polls the execution result, specifically, the embedded object transmits the transaction identifier corresponding to the person selecting service to the first application, and the first application transmits the transaction identifier to the first application server. And the first application server inquires an execution result corresponding to the transaction identifier according to the transaction identifier, and checks whether the transaction identifier exists, if so, the first application server returns the execution result of the transaction identifier inquiry to the first application. The first application returns the execution result of the transaction identification query to the embedded object. The embedded object checks whether the returned execution result corresponds to the transaction identifier, if so, the embedded object exits the polling and returns the execution result to sdk of the second application, and sdk of the second application returns the execution result to an application page of the second application by calling a callback function. If the first application server does not inquire the execution result corresponding to the target service, namely, the first application server does not have the execution result, namely, the embedded object does not receive the execution result, the embedded object waits for a period of time until the execution result is received.
For the sharing service, as shown in fig. 7, a flow chart of the sharing service is shown. The application page of the second application initializes sdk corresponding to the sharing service, i.e. registers the getagentconfigugsignaling by calling ww.register, and obtains the authentication parameter agentconfigugparameters by getagentconfiguration. The application page is in an unregistered state, i.e., the target account is not registered on the application page. If the application page does not receive the error prompt corresponding to the sharing service, calling a sdk interface (sdkapi: ww. CreateJSAPINAme) to sdk corresponding to the sharing service, requesting sdk corresponding to the sharing service to render an embedded object (i.e. invisible iframe) corresponding to the sharing service from a Node (running environment), rendering by the Node according to a service interface calling parameter corresponding to the sharing service to obtain the embedded object, obtaining the embedded object by an application page of the second application, and placing the embedded object in a certain area of the application page to obtain the sharing button, wherein the service interface calling parameter of the sharing service is used for determining the attribute of the embedded object corresponding to the sharing service, and the service interface calling parameter of the sharing service is shown in the following table 4:
Table 4 service interface invocation parameters for sharing services
Parameter name Type(s) Must be filled with Description of the invention
params object Is that jsapi parameters, referred to below
innerStyle object Whether or not Panel body style, refer to the following
success function Whether or not Callback function SelectContactResp with successful interface call
fail function Whether or not Callback function of interface call failure
complete function Whether or not Callback function ending interface call (call success and failure will be executed)
The relevant definitions of the above jsapi parameters are shown in table 5 below:
table 5JSAPI parameter table
Parameter name Type(s) Must be filled with Description of the invention
title string Is that Sharing titles
link string Is that Sharing links
image_url string Whether or not Picture address
The meanings of the above-mentioned InnerStyle parameters are shown in Table 6:
TABLE 6InnerStyle parameter Table
Parameter name Type(s) Must be filled with Description of the invention
cursor string Whether or not css cursor style
After the sharing button is displayed on the application page, a triggering process is performed as follows, specifically, after the user clicks the sharing button, when the embedded object corresponding to the sharing service detects a triggering event for the embedded object, verification information is requested to sdk in the second application through the embedded object, where the verification information includes authentication parameters. Sdk corresponding to the sharing service in the second application sends authentication parameters (shortConfigParams) to the embedded object, the embedded object determines verification information according to the authentication parameters (shortConfigParams), determines a first webpage request according to the verification information, and sends the first webpage request and interface parameters (Invoke JSAPI) to a desktop client where the first application is located. The desktop client transparently passes the first web page request and interface parameters (Invoke JSAPI) to a first application server. The first application server also receives login state information, wherein the login state information characterizes a desktop client link, namely a long link of information transmitted by the desktop client and the first application server, and the login state information comprises a target account number and an enterprise identifier of an enterprise associated with the target account number. The first application server queries page information authorized by a third-party server corresponding to the enterprise identifier. If the page information authorized by the third party service provider is not matched with the authentication parameters, checking is failed, returning error information to the first application, returning the error information to the embedded object by the first application, returning the error information to the application page by the embedded object through checking, and ending the current sharing flow.
In addition, the first application server also determines the current version number of the first application according to the authorization information, and if the current version number does not support the sharing service, the application page of the second application also prompts error information. FIG. 8A is a schematic diagram of an interface for sharing a business failure in one embodiment. At this time, an error sub-page is displayed in the application page, that is, about the first application, the error sub-page of the chat is selected, and the error sub-page directly displays "your first application version is too low, please upgrade to use after the latest version of the first application, and the upgrade path: the first application is on the desktop client-top left head portrait-about-check update "to guide the user to update the version. If the page information authorized by the third-party server is matched with the authentication parameters, the verification is passed, a response of successful verification is returned to the first application, namely a shared original popup window (namely an original sharing interface) is evoked, and a transaction identifier (namely a pellid) corresponding to the sharing service is generated.
If the native popup window is not successfully invoked within a preset time period, the application page also displays an error prompt, as shown in fig. 8B, which is an interface schematic diagram of a service sharing failure in another embodiment. At this time, an erroneous sub-page, i.e., an erroneous sub-page regarding the first application-selection chat, is displayed in the application page, and the erroneous sub-page direct display shows "opening the first application. At this time, the information of "if you have not installed the first application, please download and install first" is also prompted, at this time, if the first application is not downloaded and installed, then "download and install" in the application page is clicked, and then the download page of the first application is opened on the new tab page.
And if the first application displays the native popup window in the application page of the second application within the preset time period. After the first application successfully evokes the native popup window, the transaction identifier is returned to the embedded object corresponding to the sharing service. And after the operation is completed, triggering a click confirm button or a cancel button in a native popup window provided by the first application, responding the operation triggering the click confirm button or the cancel button by the first application, determining an execution result corresponding to the sharing service, and returning the execution result to the first application server through a transaction identifier. In this process, the embedded object corresponding to the sharing service polls the execution result, specifically, the embedded object transmits the transaction identifier corresponding to the sharing service to the first application, and the first application transparently transmits the transaction identifier to the first application server. And the first application server inquires an execution result corresponding to the transaction identifier according to the transaction identifier, and checks whether the transaction identifier exists, if so, the first application server returns the execution result of the transaction identifier inquiry to the first application. The first application returns the execution result of the transaction identification query to the embedded object. The embedded object checks whether the returned execution result corresponds to the transaction identifier, if so, the embedded object exits the polling and returns the execution result to sdk of the second application, and sdk of the second application returns the execution result to an application page of the second application by calling a callback function. If the first application server does not inquire the execution result corresponding to the target service, namely, the first application server does not have the execution result, namely, the embedded object does not receive the execution result, the embedded object waits for a period of time until the execution result is received.
Based on the above, the realization of the target service is that under the condition that the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
The target services involved include a person selection service and a sharing service. In addition, the target service also includes a login service. The following will describe an application information access method in a login service.
In one embodiment, as shown in fig. 9, an application information access method is provided, and the method is applied to the first application in the terminal 102 in fig. 1 for illustration, and includes the following steps:
at step 902, after logging in with the target account, a web page is opened to request proxy services.
And associating the target account with a corresponding enterprise, wherein the target account is an account of the first application. Alternatively, the first application may be a social application, a payment application, a video application, a gaming application, or the like. For example, the social application may be an instant messaging application, a live application, etc., without limitation in particular. The web page request proxy service is used for realizing communication between the first application server and the first application and the second application in the terminal, and therefore, starting the web page request proxy service means developing communication capability between the first application server and the first application and the second application in the terminal. Alternatively, the web page request proxy service is an http (Hyper Text Transfer Protocol ) service. Alternatively, to ensure the security of the communication, the secure communication between the first application server, the first application in the terminal and the second application may be implemented using an encrypted http protocol (i.e. https protocol).
Optionally, after the first application in the terminal logs in with the target account, starting the webpage to request the proxy server. The first application in the terminal is an application of a desktop client. After a first application of the desktop client logs in by a target account, the desktop client starts a webpage to request proxy service.
For example, the desktop client of the instant messaging application logs in with the target account, that is, the login state of the desktop client of the instant messaging application is that the target account is logged in, and the desktop client of the instant messaging application opens a local webpage to request proxy service.
Step 904, receiving a second web page request sent by a login component created by a second application through a web page request proxy service; the second web page request is used to confirm whether the first application is in a login state.
The login component is used for quickly logging in the application page of the second application by the target account number. The login component may be placed in a designated area in the application page.
Optionally, the first application receives a second web page request sent by a login component created by the second application through a web page request proxy service.
Step 906, sending the login status information of the second webpage request and the target account to the first application server.
The login state information characterizes whether the target account is logged in or not, and comprises information that the target account is logged in and information that the target account is not logged in.
In step 908, if the first application receives a response from the first application server according to the second web page request and the login state information, the account information of the target account is returned to the login component created on the application page of the second application, so as to instruct the login component to display a login interface for logging in the second application with the target account.
Optionally, the first application server directly sends a response to the first application after receiving the second webpage request and the login state information of the target account. And the first application returns the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application with the target account.
The first application server, after receiving the second web page request and the login state information of the target account, directly sends a response to the first application. The first application forwards the response to a login component created by the second application, the login component sends login information to the first application, the first application sends a target account number and the login information to a first application server, the first application server correlates the target account number with the login information and sends correlation success information to the first application, the correlation success information carries account number information of the target account number, the first application sends the correlation success information to the login component, and the login component displays a login interface for logging in the second application with the target account number according to the account number information. The login information characterizes attribute information of the login component, and the account information comprises a target account and an enterprise identifier of an enterprise associated with the target account.
FIG. 10A is a schematic diagram of a login interface for quick login in one embodiment. The login component is embedded in the second application, and shows the header of the target account number, the target account number (i.e., the "small-mine" in the figure), and the enterprise (i.e., the "a-enterprise" in the figure) associated with the target account number in the first application. A plurality of login modes are displayed in the login component, wherein the login modes comprise quick login and code scanning login of the first application. When a user clicks a page area where the first application fast logs in, the user can fast log in the target account in the second application, and the method is simple and convenient.
In addition, the login interface may not be embedded in the second application, that is, the login interface may be embedded in any web page that does not belong to the second application, as shown in fig. 10B, which is a schematic diagram of a login interface for quick login in another embodiment. In any web page that does not belong to the second application, the login component in the login interface displays the avatar of the target account in the first application, the target account (i.e., "min" in the figure), and the business with which the target account is associated (i.e., "a business" in the figure). A plurality of login modes are displayed in the login component, wherein the login modes comprise quick login and code scanning login of the first application. When a user clicks a page area where the first application fast logs in, the user can fast log in the target account in the second application, and the method is simple and convenient.
According to the application information access method, after logging in by the target account, a webpage is started to request proxy service; receiving a second webpage request sent by a login component created by a second application through a webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not; sending a second webpage request and login state information of the target account to a first application server; if the first application receives a response of the first application server according to the second webpage request and the login state information, the account information of the target account is returned to the login component created by the application page of the second application, so that the login component is indicated to display a login interface for logging in the second application by the target account.
In one embodiment, the step of the second application creating the login component comprises: and sending a call request for calling a login component creation interface of the first application server through the second application, and receiving the login component created by the first application server in response to the call request.
Optionally, a call request for calling a login component creation interface of the first application server is sent out through the second application, the first application server creates the login component in response to the call request, and the login component is sent to the second application.
Illustratively, the login component creation interface is obtained by initializing sdk corresponding to the login service with the second application. And sending a call request for calling a login component creation interface of the first application server through the second application, and enabling the first application server to create the login component in response to the call request and send the login component to the second application.
For example, before creating the login component, the login component parameters are obtained by initializing sdk corresponding to the login service, and the login component parameters are shown in the following table 7:
table 7 registration component parameter table for registration service
The relevant definition of the params parameters described above is shown in table 8 below:
TABLE 8Params parameter Table
Parameter name Type(s) Must be filled with Description of the invention
redirectUri string Is that Redirecting addresses after authorized login
appid string Is that Enterprise ID
loginType string Is that Login type
Thus, the first application server is able to create a logon component from the logon component parameters. The login component is then sent to the first application.
In this embodiment, after a call request for calling a login component creation interface of the first application server is sent by the second application, the first application server can quickly construct a login component corresponding to the current login service by responding to the call request.
In one embodiment, the step of sending, by the login component, the second web page request to the first application specifically includes: sending a verification request for verifying login parameters to a first application server according to the redirection address of the second application and the application identifier of the second application through a login component; and when the login component receives a response to the successful verification fed back by the first application server, sending a second webpage request to the first application through the login component.
Optionally, through the login component, a verification request for verifying the login parameter is sent to the first application server according to the redirection address of the second application and the application identifier of the second application. The verification login parameters of the verification request include the redirect address and an application identification. The first application server receives the verification request, verifies whether the redirection address in the verification request is an authorized address, and verifies whether the application corresponding to the application identifier is an authorized application. If the redirected address is an authorized address and the application corresponding to the application identifier is an authorized application, the verification is determined to be successful, and the first server feeds back a response of the successful verification to the login component. And when the login component receives a response to the successful verification fed back by the first application server, sending a second webpage request to the first application through the login component.
If the redirection address is an authorized address and the application corresponding to the application identifier is an authorized application, the verification is determined to be successful, the first server feeds back a response of the verification success to the login component, and feeds back login information corresponding to the application identifier to the login component, wherein the login information is used for displaying a login interface for logging in a second application by using the target account number. And when the login component receives a response to the successful verification fed back by the first application server, sending a second webpage request to the first application through the login component. If the redirected address is not the authorized address or the application corresponding to the application identifier is not the authorized application, determining that verification fails, and returning an error code to the login component by the first application server, wherein the login component displays the error code.
In this embodiment, through the login component, a verification request for verifying the login parameter is sent to the first application server according to the redirection address of the second application and the application identifier of the second application. Therefore, the first application server can check the validity of the redirection address and the application identifier of the skip page after successful login, so as to ensure the validity of the subsequent login service. When the login component receives a response of successful verification fed back by the first application server, the login component directly sends a second webpage request to the first application so as to carry out subsequent association operation.
In one embodiment, the method further comprises the step of logging in to the second application with the target account number, the step comprising: and responding to the triggering operation of the login control in the login interface, receiving a temporary authorization credential fed back by the first application server through the login component, and entering a redirection page of the second application according to the temporary authorization credential after obtaining the temporary authorization credential through the second application.
Optionally, the first application server confirms that the target account logs in to the second application in response to a triggering operation on a login space in the login interface, and generates temporary authorization credentials. The first application server sends the information confirming the login and the temporary authorization credential to the login component, which sends the temporary authorization credential to sdk of the second application, which sends sdk the temporary authorization credential to the second application. After the second application obtains the temporary authorization credential, the second application enters a redirection page corresponding to the redirection address according to the temporary authorization credential.
Illustratively, the first application server responds to the triggering operation of the login component in the login interface to confirm that the target account logs in to the second application, and generates a temporary authorization credential authCode, and the first application service pushes a login success message to an H5 (5 th generation Html (internet hypertext markup language)) page. The first application server sends the information confirming the login and the temporary authorization credential to the login component, which sends the temporary authorization credential authCode to sdk of the second application, which sends the temporary authorization credential to the second application, which sdk. After the second application obtains the temporary authorization credential, the second application jumps to a redirection page corresponding to the redirection address redirection uri according to the temporary authorization credential. FIG. 11 is a schematic diagram of a successful login of a second application in one embodiment. The second application in fig. 11 is an application of OKR, whose target account number is small. Three key results (i.e., KR1 to KR 3) corresponding to the target account number of the second application are displayed in the application page of the second application. In addition, the H5 page is used for pushing login information, and can be displayed on a desktop client and a mobile phone client, specifically, the current login date and time in the H5 page are displayed, and the current login operation notification is displayed.
In this embodiment, in response to a triggering operation of the login control in the login interface, once the temporary authorization credential fed back by the first application server is received through the login component, the login state of the second application can be directly determined to be the logged-in state, so that the redirection page can be timely and rapidly entered, and the efficiency of redirection processing is improved.
In one embodiment, the method further comprises the step of the second application obtaining an interface call credential, the step comprising: and exchanging the temporary authorization credential for the interface call credential of the second application from the first application server, wherein the interface call credential is used for the second application to call the interface of the first application server.
Optionally, the temporary authorization credential is sent to the first application server through the API of the second application in exchange for the interface invocation credential and the user identity information. The first application server sends the interface call certificate and the user identity information to the second application, and the login service is completed successfully.
It should be noted that the temporary authorization credential may be obtained by any one of the second applications, i.e. for each second application, the temporary authorization credential of that second application is likely to be revealed, i.e. used by other second applications. Thus, to ensure that each second application can use the credentials that it is adapted to and that it will not be used by other second applications, to conduct subsequent election services based on the credentials. And sending the temporary authorization certificate to the first application server, and exchanging the temporary authorization certificate by the corresponding key to obtain the interface call certificate.
In this embodiment, the temporary authorization credential is used to exchange the interface call credential of the second application with high security corresponding to the temporary authorization credential from the first application server, so that the security of interface call in subsequent services can be ensured.
The following will describe a specific procedure of the login service.
For the login service, as shown in fig. 12, a schematic flow diagram of the login service in one embodiment is shown. The second application initializes sdk corresponding to the login service, that is, obtains the login component creation interface by calling ww.webLogin, sends a call request for calling the login component creation interface of the first application server through the second application, creates an iframe in response to the call request by the first application server, obtains the login component, and sends the login component to sdk in the second application. And sending a verification request for verifying the login parameters to the first application server according to the redirection address of the second application and the application identifier of the second application through the login component. When the second application is a self-built application, the verification login parameter of the verification request comprises the redirection address and the application identifier, and also comprises the enterprise morph. And when the second application is a third party application, the verification login parameters of the verification request comprise a redirection address and a morph of the enterprise. Taking the second application as a self-built application as an example, the first application server receives a verification request, verifies whether a redirection address in the verification request is an authorized address, and verifies whether an application corresponding to the application identifier is an authorized application. If the redirection address is an authorized address and the application corresponding to the application identifier is an authorized application, determining that the verification is successful, feeding back a response of the successful verification to the login component by the first server, feeding back login information corresponding to the application identifier to the login component, and displaying a login interface for logging in a second application by using the target account number by the login information. And when the login component receives a response to the successful verification fed back by the first application server, sending a second webpage request to the first application through the login component. If the redirected address is not the authorized address or the application corresponding to the application identifier is not the authorized application, determining that verification fails, and returning an error code to the login component by the first application server, wherein the login component displays the error code.
And under the condition of successful verification, entering a quick login flow. Specifically, the login component sends login information to the first application to correlate the operation of the login identity. The first application sends the target account number and the login information to a first application server, the first application server correlates the target account number with the login information and sends correlation success information to the first application, the correlation success information carries account number information of the target account number, the first application sends the correlation success information to a login component, and the login component displays quick login information, namely a login interface for logging in the second application by the target account number is displayed. And the first application server responds to the triggering operation of the login component in the login interface, confirms that the target account logs in the second application, generates a temporary authorization credential authCode, and pushes a login success message to the H5 page. The first application server sends the information confirming the login and the temporary authorization credential to the login component, which sends the temporary authorization credential to sdk of the second application, which sends sdk the temporary authorization credential to the second application. After the second application obtains the temporary authorization credential, the second application jumps to a redirection page corresponding to the redirection address redirection uri with the temporary authorization credential. And consuming the temporary authorization credential through the API of the second application, namely sending the temporary authorization credential to the first application server to exchange the interface call credential webToken and the user identity information. The first application server sends the interface call certificate and the user identity information to the second application, and the login service is completed successfully.
The above-mentioned process is a quick login process in login service, and for the login service, there is also a login by scanning a code with a two-dimensional code. Fig. 13 is a schematic flow chart of a login service in another embodiment. The second application initializes sdk corresponding to the login service, that is, obtains the login component creation interface by calling ww.webLogin, sends a call request for calling the login component creation interface of the first application server through the second application, creates an iframe in response to the call request by the first application server, obtains the login component, and sends the login component to sdk in the second application. And sending a verification request for verifying the login parameters to the first application server according to the redirection address of the second application and the application identifier of the second application through the login component. When the second application is a self-built application, the verification login parameter of the verification request comprises the redirection address and the application identifier, and also comprises the enterprise morph. And when the second application is a third party application, the verification login parameters of the verification request comprise a redirection address and a morph of the enterprise. Taking the second application as a self-built application as an example, the first application server receives a verification request, verifies whether a redirection address in the verification request is an authorized address, and verifies whether an application corresponding to the application identifier is an authorized application. If the redirection address is an authorized address and the application corresponding to the application identifier is an authorized application, determining that the verification is successful, feeding back a response of the successful verification to the login component by the first server, feeding back login information corresponding to the application identifier to the login component, and displaying a login interface for logging in a second application by using the target account number by the login information. And when the login component receives a response to the successful verification fed back by the first application server, sending a second webpage request to the first application through the login component. If the redirected address is not the authorized address or the application corresponding to the application identifier is not the authorized application, determining that verification fails, and returning an error code to the login component by the first application server, wherein the login component displays the error code.
And under the condition of successful verification, entering a code scanning login flow. Specifically, the first application returns a login webKey (two-dimensional code) to the login component, and the login component displays the login two-dimensional code, as shown in fig. 14A, which is a schematic diagram of a login interface for code scanning login in one embodiment. In the figure, the login component is embedded in the second application, and the login component displays a first application login, and the first application is used for scanning the two-dimensional code to login. In addition, the login interface may not be embedded in the second application, that is, the login interface may be embedded in any web page that does not belong to the second application, as shown in fig. 14B, which is a schematic diagram of a login interface for code scanning login in another embodiment. In any web page not belonging to the second application, the login component displays "first application login, please use the first application to scan the two-dimensional code login".
The code scanning operation is realized through the H5 page, the login can be canceled after the code scanning, and the login can also be confirmed. At this point, the login component monitors the login status, i.e., whether the code has been scanned. If the code is scanned, H5 sends an updated login state to the first application server. At this time, the login component determines whether to login, i.e., to confirm login, cancel, or not login, based on the updated login status sent by the first application server. If the updated login state sent by the first application server is the confirmed login, the first application server pushes a login success message to the H5 page. The first application server sends the information confirming the login and the temporary authorization credential to the login component, which sends the temporary authorization credential to sdk of the second application, which sends sdk the temporary authorization credential to the second application. After the second application obtains the temporary authorization credential, the second application jumps to a redirection page corresponding to the redirection address redirection uri with the temporary authorization credential. And consuming the temporary authorization credential through the API of the second application, namely sending the temporary authorization credential to the first application server to exchange the interface call credential webToken and the user identity information. The first application server sends the interface call certificate and the user identity information to the second application, and the login service is completed successfully.
In one embodiment, as shown in fig. 15, an application service access method is provided, where the method involves an interaction process between a first application, an embedded object, a second application, and a first application server, and the target service involved in the method includes a person selection service and a sharing service. The method comprises the following steps:
step 1502, creating an embedded object for a target service through an application page of a second application; the embedded object is used to access a target service of the first application in the application page.
In step 1504, a first web request is sent to a first application by an embedded object, where the first web request carries verification information required by a second application to access a target service, where the verification information is obtained by the second application from a first application server.
In step 1506, the first web request is received by the web request proxy service opened by the first application when the first application is in the login state, and the first web request and the login state information of the first application are sent to the first application server.
Step 1508, through the first application, after receiving the response that the first application server successfully verifies the login state information according to the first web page request, returning the original page content of the target service in the first application to the application page of the second application.
In the application service access method, an embedded object aiming at a target service is created through an application page of a second application; the embedded object is used for accessing a target service of the first application in the application page; sending a first webpage request to a first application through an embedded object, wherein the first webpage request carries verification information required by a second application to access a target service, and the verification information is obtained by the second application from a first application server; receiving a first webpage request through a webpage request proxy service which is started when a first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server; and returning the original page content of the target service in the first application to the application page of the second application after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
In one embodiment, an application information access method is provided, the method relates to an interaction process among a first application, an embedded object, a second application and a first application server, and a target service related to the method comprises a login service. The method comprises the following steps: and sending a call request for calling a login component creation interface of the first application server through the second application, and receiving the login component created by the first application server in response to the call request. Sending a second webpage request to the first application through the login component, wherein the second webpage request is used for confirming whether the first application is in a login state or not; the method comprises the steps that a web page request proxy server started when a first application is in a login state receives a second web page request, and the second web page request and login state information of a target account number are sent to the first application server; and returning the account information of the target account to the login component created by the application page of the second application after receiving the response of the first application server according to the second webpage request and the login state information through the first application, so as to instruct the login component to display a login interface for logging in the second application by the target account.
According to the application information access method, after logging in by the target account, a webpage is started to request proxy service; receiving a second webpage request sent by a login component created by a second application through a webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not; sending a second webpage request and login state information of the target account to a first application server; if the first application receives a response of the first application server according to the second webpage request and the login state information, the account information of the target account is returned to the login component created by the application page of the second application, so that the login component is indicated to display a login interface for logging in the second application by the target account. In this way, when the first application is in the login state, the first application can receive the second webpage request sent by the login component created by the application page of the second application through the opened webpage request proxy service, and the first application can send the second webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the application page is enabled to perform efficient application service access.
The application also provides an application scene, which applies the application service access method. Specifically, the application of the application service access method in the application scenario is as follows: in relation to the application scenario, for a first application to be an instant messaging application, a third party facilitator develops a second application for an enterprise with which the first application is associated. In this case, in order to facilitate the user in the enterprise to utilize the first application and the second application to the maximum extent, it is often involved in sharing the information of the application page in the second application to the target account number of the first application. Specifically, after logging in with a target account, starting a webpage to request proxy service; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of a first application in an application page of a second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
Of course, the application service access method provided by the application is not limited to the method, and the method can be applied to other application scenes, and the information of the webpage in the second application is shared to the first application with the same or similar functions aiming at the personalized recommendation scene. At this time, in order to facilitate sharing of information in the second application to the group in the first application by the same user account, the application service access method applied by the application community can be adopted to realize efficient access in different applications.
The above application scenario is only illustrative, and it can be understood that the application of the application service access method provided by the embodiments of the present application is not limited to the above scenario.
In a specific embodiment, an application service access method is provided, which is applied to a first application, in particular: and obtaining an authentication parameter of the second application from the first application server according to the current account through the second application logged in by the current account, wherein the authentication parameter is used for indicating at least one of an enterprise identifier of an enterprise associated with the current account, an application identifier authorized by the associated enterprise or a visible range of the second application. Calling an embedded object creation interface of the first application server through the second application according to the service interface name of the target service and the service interface calling parameter of the target service, wherein the service interface calling parameter comprises the drawing parameter of the embedded object; receiving an embedded object drawn and returned by a first application server according to drawing parameters; and displaying the embedded object in an application page of the second application. After logging in with the target account, starting a webpage to request proxy service; when the embedded object detects a trigger event aiming at the embedded object, the embedded object requests verification information to the second application, wherein the verification information comprises interface call credentials and authentication parameters required by the second application to access an interface of the first application server; and requesting the first webpage request initiated by the proxy service from the webpage of the first application according to the verification information through the embedded object. Receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of a first application in an application page of a second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
Sending a first webpage request and login state information of a target account to a first application server; forwarding a first webpage request and login state information of a target account to a first application server under the condition that a first application is logged in by the target account; and under the condition that the first application is in an unregistered state, skipping from the second application to the first application to execute login operation, returning to the second application after the first application logs in the target account, and sending a first webpage request and login state information of the target account to the first application server. The login state information of the target account comprises an enterprise identifier of an enterprise associated with the target account; the verification information comprises authentication parameters; under the condition that a first application server receives a first webpage request and login state information, inquiring authorization information corresponding to an enterprise identifier through the first application server; and if the authentication parameters are matched with the authorization information, returning a response to the successful verification to the first application. If the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. And displaying the original page content of the target service through the application page of the second application, and triggering the execution of the target service in the application page in response to the triggering operation on the original page content.
In the embodiment, after logging in with the target account, a webpage is opened to request proxy service; receiving a first webpage request sent by an embedded object created by an application page of a second application through a webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, the webpage request carries verification information required by the second application for accessing the target service, and the verification information is obtained by the second application from the first application server; sending a first webpage request and login state information of a target account to a first application server; if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page. In this way, when the first application is in the login state, the first application can receive the first webpage request sent by the application page of the second application through the opened webpage request proxy service, and the first application can send the first webpage request to the corresponding first application server, namely, the application page of the second application directly interacts with the first application and the first application server through the webpage request proxy service to perform service access corresponding to the target service, and the efficient application service access of the application page is realized.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides an application service access device for realizing the above related application service access method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the application service access device or devices provided below may refer to the limitation of the application service access method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 16, there is provided an application service access apparatus, including: a first turn-on module 1602, a first receive module 1604, a first transmit module 1606, and a first return module 1608, wherein:
the first opening module 1602 is configured to open a web page to request proxy services after logging in with a target account number.
The first receiving module 1604 is configured to receive, through a web page request proxy service, a first web page request sent by an embedded object created by an application page of the second application; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from the first application server.
The first sending module 1606 is configured to send the first web request and login status information of the target account to the first application server.
The first returning module 1608 is configured to return the original page content of the target service in the first application to the application page of the second application to access the target service in the application page if the first application receives a response that the first application server succeeds in verifying the verification information and the login state information carried by the first web page request.
The specific details and the beneficial effects of the application service access device provided in the embodiments of the present application have been described in detail in the corresponding method embodiments, and reference may be made to the corresponding method embodiments.
Based on the same inventive concept, the embodiment of the application also provides an application information access device for realizing the above related application information access method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the application information access device or devices provided below may refer to the limitation of the application information access method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 17, there is provided an application information access apparatus including: a second turn-on module 1702, a second receive module 1704, a second transmit module 1706, and a second return module 1708, wherein:
a second opening module 1702 is configured to open a web page to request a proxy service after logging in with the target account number.
The second receiving module 1704 is configured to receive, through a web page request proxy service, a second web page request sent by a login component created by a second application; the second web page request is used to confirm whether the first application is in a login state.
The second sending module 1706 is configured to send the login status information of the second webpage request and the target account to the first application server.
And the second returning module 1708 is configured to return the account information of the target account to the login component created by the application page of the second application if the first application receives a response from the first application server according to the second web page request and the login state information, so as to instruct the login component to display a login interface for logging in the second application with the target account.
The specific details and the beneficial effects of the application information access device provided in the embodiments of the present application have been described in detail in the corresponding method embodiments, and reference may be made to the corresponding method embodiments.
Based on the same inventive concept, the embodiment of the application also provides an application service access device for realizing the above related application service access method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the application service access device or devices provided below may refer to the limitation of the application service access method hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 18, there is provided an application service access apparatus, including: a creation module 1802, a third sending module 1804, and a third return module 1806, wherein:
a creating module 1802, configured to create an embedded object for a target service through an application page of a second application; the embedded object is used to access a target service of the first application in the application page.
The third sending module 1804 is configured to send, to the first application, a first web page request through the embedded object, where the first web page request carries verification information required by the second application to access the target service, where the verification information is obtained by the second application from the first application server.
The third sending module 1804 is configured to receive, by using a web page request proxy service that is started when the first application is in the login state, the first web page request, and send the login state information of the first application to the first application server.
And the third return module 1806 is configured to return, through the first application, the native page content of the target service in the first application to the application page of the second application after receiving a response that the first application server successfully verifies the login state information according to the first web page request.
The specific details and the beneficial effects of the application service access device provided in the embodiments of the present application have been described in detail in the corresponding method embodiments, and reference may be made to the corresponding method embodiments.
Each of the above-described two application service access apparatuses and application information access apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, and the internal structure of which may be as shown in fig. 19. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements two application service access methods and an application information access method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 19 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (19)

1. An application service access method, applied to a first application, comprising:
after logging in with the target account, starting a webpage to request proxy service;
receiving a first webpage request sent by an embedded object created by an application page of a second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
Sending the first webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server to the successful verification of the verification information and the login state information carried by the first webpage request, returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page.
2. The method of claim 1, wherein the step of creating an embedded object for the application page of the second application comprises:
calling an embedded object creation interface of the first application server according to the service interface name of the target service and the service interface calling parameter of the target service through the second application, wherein the service interface calling parameter comprises the drawing parameter of the embedded object;
receiving the embedded object drawn and returned by the first application server according to the drawing parameters;
and displaying the embedded object in the application page of the second application.
3. The method of claim 2, further comprising the step of obtaining authentication parameters by the second application before the embedded object is created by the application page of the second application, the step comprising:
And obtaining an authentication parameter of the second application from the first application server according to the current account through the second application logged in with the current account, wherein the authentication parameter is used for indicating at least one of an enterprise identifier of an enterprise associated with the current account, an application identifier authorized by the associated enterprise or a visible range of the second application.
4. The method of claim 3, wherein the step of sending the first web page request through the embedded object comprises:
when the embedded object detects a trigger event aiming at the embedded object, requesting verification information from the second application through the embedded object, wherein the verification information comprises an interface calling certificate and the authentication parameter, wherein the interface calling certificate and the authentication parameter are required by the second application to access an interface of the first application server;
and requesting, by the embedded object, a first webpage request initiated by a proxy service from the webpage of the first application according to the verification information.
5. The method of claim 1, wherein the sending the login status information of the first web page request and the target account number to the first application server comprises:
Forwarding the first webpage request and login state information of the target account to a first application server under the condition that the first application is logged in by the target account;
and under the condition that the first application is in an unregistered state, skipping from the second application to the first application to execute a login operation, returning to the second application after the first application logs in with a target account, and sending the first webpage request and login state information of the target account to a first application server.
6. The method of claim 1, wherein the login status information of the target account includes an enterprise identity of the target account and an enterprise with which the target account is associated; the verification information comprises authentication parameters; the step of verifying the login state information by the first application server according to the verification information carried by the first webpage request comprises the following steps:
inquiring authorization information corresponding to the enterprise identifier through the first application server under the condition that the first application server receives the first webpage request and the login state information;
and if the authentication parameters are matched with the authorization information, returning a response of successful verification to the first application.
7. The method according to any of claims 1 to 6, further comprising the step of triggering the target service in the application page, the step comprising:
and displaying the original page content of the target service through the application page of the second application, and triggering the execution of the target service in the application page in response to the triggering operation of the original page content.
8. An application information access method, applied to a first application, comprising:
after logging in with the target account, starting a webpage to request proxy service;
receiving a second webpage request sent by a login component created by a second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
sending the second webpage request and login state information of the target account to a first application server;
and if the first application receives a response of the first application server according to the second webpage request and the login state information, returning the account information of the target account to the login component created by the application page of the second application so as to instruct the login component to display a login interface for logging in the second application by the target account.
9. The method of claim 8, wherein the step of the second application creating a logon component comprises:
and sending a call request for calling a login component creation interface of the first application server through the second application, and receiving the login component created by the first application server in response to the call request.
10. The method according to claim 9, wherein the step of sending the second web page request to the first application via the login component comprises:
sending a verification request for verifying login parameters to the first application server according to the redirection address of the second application and the application identifier of the second application through the login component;
and when the login component receives a response to the successful verification fed back by the first application server, sending the second webpage request to the first application through the login component.
11. A method according to any one of claims 8 to 10, further comprising the step of logging in the second application with the target account number, the step comprising:
and responding to the triggering operation of the login control in the login interface, receiving a temporary authorization credential fed back by the first application server through the login component, and entering a redirection page of the second application according to the temporary authorization credential after the second application obtains the temporary authorization credential.
12. The method of claim 11, further comprising the step of the second application obtaining interface call credentials, the step comprising:
and exchanging the temporary authorization credential for the interface call credential of the second application from the first application server, wherein the interface call credential is used for the second application to call the interface of the first application server.
13. An application service access method, the method comprising:
creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
receiving the first webpage request through a webpage request proxy service started by the first application when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
And after receiving response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application, returning the original page content of the target service in the first application to the application page of the second application.
14. An application service access apparatus, the apparatus comprising:
the first opening module is used for opening a webpage to request proxy service after logging in with a target account;
the first receiving module is used for receiving a first webpage request sent by an embedded object created by an application page of the second application through the webpage request proxy service; the embedded object is used for accessing a target service of the first application in an application page of the second application, and the first webpage request carries verification information required by the second application for accessing the target service, wherein the verification information is obtained by the second application from a first application server;
the first sending module is used for sending the first webpage request and login state information of the target account to a first application server;
and the first return module is used for returning the original page content of the target service in the first application to the application page of the second application so as to access the target service in the application page if the first application receives a response of the first application server, which is successfully checked according to the check information carried by the first webpage request and the login state information.
15. An application information access apparatus, the apparatus comprising:
the second opening module is used for opening the webpage to request proxy service after logging in with the target account;
the second receiving module is used for receiving a second webpage request sent by the login component created by the second application through the webpage request proxy service; the second webpage request is used for confirming whether the first application is in a login state or not;
the second sending module is used for sending the second webpage request and login state information of the target account to the first application server;
and the second return module is used for returning the account information of the target account to the login component created by the application page of the second application if the first application receives the response of the first application server according to the second webpage request and the login state information, so as to instruct the login component to display a login interface for logging in the second application by the target account.
16. An application service access apparatus, the apparatus comprising:
the creation module is used for creating an embedded object aiming at the target service through an application page of the second application; the embedded object is used for accessing a target service of a first application in the application page;
The third sending module is used for sending a first webpage request to the first application through the embedded object, wherein the first webpage request carries verification information required by the second application to access the target service, and the verification information is obtained by the second application from a first application server;
the third receiving module is used for receiving the first webpage request through a webpage request proxy service started when the first application is in a login state, and sending the first webpage request and login state information of the first application to a first application server;
and the third return module is used for returning the original page content of the target service in the first application to the application page of the second application after receiving a response which is successfully checked and returned by the first application server according to the first webpage request and the login state information through the first application.
17. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 13 when the computer program is executed.
18. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 13.
19. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 13.
CN202211520261.7A 2022-11-30 2022-11-30 Application service access method, device, computer equipment and storage medium Pending CN117221400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211520261.7A CN117221400A (en) 2022-11-30 2022-11-30 Application service access method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211520261.7A CN117221400A (en) 2022-11-30 2022-11-30 Application service access method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117221400A true CN117221400A (en) 2023-12-12

Family

ID=89034034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211520261.7A Pending CN117221400A (en) 2022-11-30 2022-11-30 Application service access method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117221400A (en)

Similar Documents

Publication Publication Date Title
US20240129319A1 (en) Method, apparatus, and computer program product for selectively granting permissions to group-based objects in a group-based communication system
US9692747B2 (en) Authenticating linked accounts
US11714626B2 (en) Method, apparatus, and computer program product for installing third party applications requiring variable host address identification in a group-based communication system
US20170317962A1 (en) Message sending method, apparatus, and system, and server
US20170279794A1 (en) User information obtaining method and apparatus, and server
US9712457B2 (en) Server directed client originated search aggregator
US10404699B2 (en) Facilitating third parties to perform batch processing of requests requiring authorization from resource owners for repeat access to resources
US11714693B2 (en) Data driven API conversion
US20070049258A1 (en) System and method of mobile to desktop document interaction using really simple syndication
US8909705B2 (en) Method and system for use in providing network services interchange
US20140173125A1 (en) Systems and methods for transferring a session between devices in an on-demand computing environment
US20130246504A1 (en) Method for subscribing to notification, apparatus and system
US9374244B1 (en) Remote browsing session management
US20130104200A1 (en) Apparatus and method for controlling access to multiple services
US9971901B2 (en) Content management apparatus and content management method
CN102377617A (en) Systems, methods, and apparatus to monitor and authenticate mobile internet activity
US10437577B2 (en) Systems and methods for mobile application installation
US20070294711A1 (en) Locating services using compiled scopes
CN106254319B (en) Light application login control method and device
US11151239B2 (en) Single sign-on management for multiple independent identity providers
KR102055897B1 (en) Authentication Method and System for Service Connection of Internet Site using Phone Number
CN102833328A (en) Unified application calling method and unified calling client
US8683559B2 (en) Method and system of serving subscribed contents from multiple sources via a global communications network
US20140089963A1 (en) Method of managing multiple content servers
CN114338130B (en) Information processing method, device, server and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication