CN115473670A - Response information transmission method and apparatus, storage medium, and electronic apparatus - Google Patents

Response information transmission method and apparatus, storage medium, and electronic apparatus Download PDF

Info

Publication number
CN115473670A
CN115473670A CN202210891930.5A CN202210891930A CN115473670A CN 115473670 A CN115473670 A CN 115473670A CN 202210891930 A CN202210891930 A CN 202210891930A CN 115473670 A CN115473670 A CN 115473670A
Authority
CN
China
Prior art keywords
application
sub
terminal
main
main application
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
CN202210891930.5A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202210891930.5A priority Critical patent/CN115473670A/en
Publication of CN115473670A publication Critical patent/CN115473670A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Abstract

The application discloses a method and a device for sending response information, a storage medium and an electronic device, which relate to the technical field of smart homes, and the method for sending the response information comprises the following steps: receiving a login request which is sent by a terminal through a main application and used for logging in a sub-application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority; and sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition that the terminal logs in the sub-application.

Description

Response information transmission method and apparatus, storage medium, and electronic apparatus
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for transmitting response information, a storage medium, and an electronic apparatus.
Background
With the development of company business, more internal or external applications are accessed into a main application platform (IOT platform tool) to enrich the functions of the main application platform, but the security and the user experience need to be better guaranteed.
Based on the prior art, some front ends realize page authority control, but the data layer can still be accessed maliciously through an interface, so that the problem of data security exists; some of the users have data-level access rights, but the pages can be opened, so that the user experience is poor.
Aiming at the problems that the safety of logging in the sub-application through the main application is low and the like in the related technology, an effective solution is not provided.
Disclosure of Invention
The embodiment of the application provides a sending method and device of response information, a storage medium and an electronic device, and aims to at least solve the problems that in the related art, the safety of logging in a sub-application through a main application is low and the like.
According to an embodiment of the present application, a method for sending response information is provided, including: receiving a login request which is sent by a terminal through a main application and used for logging in a sub-application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority; and sending first response information to the terminal so that the terminal displays a target page of the sub application according to the first page resource in the response information under the condition that the terminal logs in the sub application.
In an exemplary embodiment, determining the control authority of the sub-application corresponding to the user information includes: determining whether the terminal has the access authority of the sub-application according to the user information and the uniform resource locator of the sub-application, and determining the menu authority of the sub-application corresponding to the user information under the condition that the terminal has the access authority of the sub-application, wherein the control authority comprises: the access rights and the menu rights; determining a first page resource corresponding to the sub-application according to the control authority, including: and determining a target menu in a target page of the sub-application, an operation control in the target menu and a target interface corresponding to the operation control according to the menu authority, wherein the operation control is used for operating the target page, and the terminal jumps to other pages through the target interface.
In an exemplary embodiment, determining the target interface corresponding to the operation control according to the menu permission includes: establishing a binding relation between the operation control and the target interface; and under the condition that the operation control is determined according to the menu authority, determining a target interface corresponding to the operation control according to the binding relationship.
In an exemplary embodiment, before receiving a login request sent by a terminal through a main application for logging in a sub-application, the method further includes: configuring a communication interface of the main application and the sub-application so that the main application logs in the sub-application through the communication interface; configuring a base container of the main application to enable the main application to access a platform of the sub-application through the base container, wherein the platform at least comprises: the system comprises a development application platform, an operation platform, a support platform and a monitoring platform.
In an exemplary embodiment, after configuring the base container of the main application so that the main application accesses the platform of the sub application through the base container, the method further includes: receiving an operation command sent by the terminal, wherein the operation command is used for indicating the main application to modify the authority setting of the sub-application through the platform; and modifying the permission setting of the sub-application according to the operation command.
In an exemplary embodiment, after receiving a login request for logging in to a sub-application sent by a terminal through a main application, the method further includes: determining whether a first identity token of the primary application is valid; determining a second page resource of a landing page of the primary application if the first identity token of the primary application is invalid; and sending second response information to the terminal so that the terminal displays the login page of the main application according to a second page resource in the second response information.
In an exemplary embodiment, after sending the second response information to the terminal, the method further includes: receiving user login information sent by a target object through a login page of the main application; and under the condition that the user login information is verified, sending a second identity token to the master application so that the master application stores the second identity token in a session object.
According to another embodiment of the present application, there is also provided a response information transmitting apparatus, including: a receiving module, configured to receive a login request sent by a terminal through a main application and used for logging in a sub-application, where the login request includes: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; the determining module is used for determining the control authority of the sub-application corresponding to the user information under the condition that the first identity token of the main application is determined to be valid, and determining the first page resource corresponding to the sub-application according to the control authority; and the sending module is used for sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition of logging in the sub-application.
According to another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the sending method of the response information when running.
According to another aspect of the embodiments of the present application, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the sending method of the response message through the computer program.
In the embodiment of the application, a login request sent by a terminal through a main application for logging in a sub-application is received, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority; sending first response information to the terminal so that the terminal displays a target page of the sub-application according to a first page resource in the response information under the condition that the terminal logs in the sub-application; by adopting the technical scheme, the problems that the safety of logging in the sub-application through the main application is low and the like are solved, and then when the user enters other sub-applications through the main application, the user is subjected to identity token aging verification, the identity token effectively and directly enters the sub-application home page, the secret-free logging is realized, and the identity token is in failure to jump to the main application home page for logging in. And if the login is successful, the control authority of the sub-application is distributed to the user, and the first page resource corresponding to the sub-application is determined according to the control authority.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a schematic diagram of a hardware environment of a method for sending a response message according to an embodiment of the present application;
fig. 2 is a flowchart of a method of transmitting response information according to an embodiment of the present application;
fig. 3 is a timing diagram of a transmission method of response information according to an embodiment of the present application;
fig. 4 is a platform architecture diagram of a transmission method of response information according to an embodiment of the present application;
FIG. 5 is an architecture diagram of a sub-application according to an embodiment of the present application;
fig. 6 is a block diagram of a device for transmitting response information according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of an embodiment of the present application, a method for sending response information is provided. The sending method of the response information is widely applied to full-House intelligent digital control application scenes such as intelligent homes (Smart Home), intelligent homes, intelligent Home equipment ecology, intelligent House (Intelligent House) ecology and the like. Alternatively, in this embodiment, the sending method of the response information may be applied to a hardware environment formed by the terminal device 102 and the server 104 as shown in fig. 1. As shown in fig. 1, the server 104 is connected to the terminal device 102 through a network, and may be configured to provide a service (e.g., an application service) for the terminal or a client installed on the terminal, set a database on the server or independent of the server, and provide a data storage service for the server 104, and configure a cloud computing and/or edge computing service on the server or independent of the server, and provide a data operation service for the server 104.
The network may include, but is not limited to, at least one of: wired networks, wireless networks. The wired network may include, but is not limited to, at least one of: wide area networks, metropolitan area networks, local area networks, which may include, but are not limited to, at least one of the following: WIFI (Wireless Fidelity), bluetooth. Terminal equipment 102 can be but not limited to be PC, the cell-phone, the panel computer, intelligent air conditioner, intelligent cigarette machine, intelligent refrigerator, intelligent oven, intelligent kitchen range, intelligent washing machine, intelligent water heater, intelligent washing equipment, intelligent dish washer, intelligent projection equipment, intelligent TV, intelligent clothes hanger, intelligent (window) curtain, intelligence audio-visual, smart jack, intelligent stereo set, intelligent audio amplifier, intelligent new trend equipment, intelligent kitchen guarding equipment, intelligent bathroom equipment, intelligence robot of sweeping the floor, intelligence robot of wiping the window, intelligence robot of mopping the ground, intelligent air purification equipment, intelligent steam ager, intelligent microwave oven, intelligent kitchen is precious, intelligent clarifier, intelligent water dispenser, intelligent lock etc..
In this embodiment, a method for sending response information is provided, and is applied to the above-mentioned computer terminal, and fig. 2 is a flowchart of a method for sending response information according to an embodiment of the present application, where the flowchart includes the following steps:
step S202, receiving a login request for logging in a sub-application, which is sent by a terminal through a main application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
it should be noted that the uniform resource locator may be understood as a URL.
Step S204, under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority;
step S206, sending first response information to the terminal, so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition that the terminal logs in the sub-application.
Through the steps, a login request which is sent by a terminal through a main application and is used for logging in a sub-application is received, wherein the login request comprises the following steps: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority; and sending first response information to the terminal so that the terminal displays a target page of the sub-application according to first page resources in the response information under the condition of logging in the sub-application, thereby solving the problems of low safety and the like of logging in the sub-application through a main application in the related technology, distributing an identity token for the user when logging in for the first time, carrying out identity token aging verification on the user when entering other sub-applications, enabling the identity token to effectively and directly enter a sub-application home page, realizing password-free logging, and skipping the identity token to the main application home page for logging in when failing. And if the login is successful, the control authority of the sub-application is distributed to the user, and the first page resource corresponding to the sub-application is determined according to the control authority.
In an exemplary embodiment, determining the control authority of the sub-application corresponding to the user information includes: determining whether the terminal has the access authority of the sub-application according to the user information and the uniform resource locator of the sub-application, and determining the menu authority of the sub-application corresponding to the user information under the condition that the terminal has the access authority of the sub-application, wherein the control authority comprises: the access rights and the menu rights; determining a first page resource corresponding to the sub-application according to the control authority, including: and determining a target menu in a target page of the sub-application, an operation control in the target menu and a target interface corresponding to the operation control according to the menu authority, wherein the operation control is used for operating the target page, and the terminal jumps to other pages through the target interface.
That is to say, in the embodiment of the present application, it is determined whether a user has an access right to a sub application according to user information and a uniform resource locator of the sub application, and in a case that the user does not have the access right to the sub application, the user is denied access to the sub application.
Under the condition that the user has access authority to the sub-application, determining menu authority corresponding to the user, and determining a target menu in a target page of the sub-application, an operation control in the target menu and a target interface corresponding to the operation control according to the menu authority; and binding the operation control with the target interface corresponding to the operation control, thereby realizing the interface access authority.
In an exemplary embodiment, determining a target interface corresponding to the operation control according to the menu permission includes: establishing a binding relationship between the operation control and the target interface; and under the condition that the operation control is determined according to the menu authority, determining a target interface corresponding to the operation control according to the binding relationship.
It should be noted that, before determining the interface corresponding to the menu permission, a binding relationship between the operation control and the target interface needs to be established, and then, under the condition that the menu permission corresponding to the user is determined, the corresponding operation control is determined according to the menu permission, and the target interface corresponding to the menu permission is determined according to the binding relationship between the operation control and the target interface.
In an exemplary embodiment, before receiving a login request sent by a terminal through a main application for logging in a sub-application, the method further includes: configuring a communication interface of the main application and the sub-application so that the main application logs in the sub-application through the communication interface; configuring a base container of the main application to enable the main application to access a platform of the sub-application through the base container, wherein the platform at least comprises: the system comprises a development application platform, an operation platform, a support platform and a monitoring platform.
According to the method and the device, a development application platform, an operation platform, a support platform, a monitoring platform and the like of the sub-application are accessed into the main application, all the sub-application permissions are distributed in the main application to be maintained, namely the permissions of the sub-application can be controlled through the main application, and the permissions can be understood as whether to access an address book, whether to acquire the position information of a user and the like.
In an exemplary embodiment, after configuring the base container of the main application to make the main application access the platform of the sub-application through the base container, the method further includes: receiving an operation command sent by the terminal, wherein the operation command is used for indicating the main application to modify the authority setting of the sub-application through the platform; and modifying the permission setting of the sub-application according to the operation command.
That is, since the development application platform, the operation platform, the support platform, the monitoring platform, and the like of the sub-application are accessed to the main application, and all the permissions of the sub-application are allocated to and maintained in the main application, the user can modify the permissions of the sub-application through the main application, and modify the permission device of the sub-application according to the operation command when receiving the operation command that the user modifies the permissions of the sub-application through the main application.
For example, when the authority of the sub-application is that the address book is not allowed to be accessed, and when an operation command of a user is received, the "not allowed to be accessed" is modified to "allowed to be accessed", it should be noted that this embodiment is only for better understanding of the present invention, and the authority of the sub-application is not limited in the embodiment of the present invention.
In an exemplary embodiment, after receiving the login request for logging in the sub-application sent by the terminal through the main application, the method further includes: determining whether a first identity token of the primary application is valid; determining a second page resource of a landing page of the primary application if the first identity token of the primary application is invalid; and sending second response information to the terminal so that the terminal displays the login page of the main application according to a second page resource in the second response information.
Specifically, when a user logs in a primary application, a server verifies an account password on a login page, the primary application is logged in for the first time, an identity token is distributed for the user, inquiry data of the identity token are carried, and the data return front end is stored locally; the main application enters other sub-applications, the user is subjected to identity token aging verification, the identity token effectively and directly enters the page of the sub-applications, secret-free login is achieved, the identity token is invalid and jumps to the main application home page login, and therefore the technical effects that the main application login is successful and the sub-applications are free from login and access are achieved.
In an exemplary embodiment, after sending the second response information to the terminal, the method further includes: receiving user login information sent by a target object through a login page of the main application; and under the condition that the user login information is verified, sending a second identity token to the master application so that the master application stores the second identity token in a session object.
That is to say, when the identity token fails, the primary application is skipped to log in on the home page, the server checks the account and password on the log-in page, the primary application logs in for the first time and allocates an identity token for the user, and the primary application stores the second identity token in the session object.
Wherein, the session object can be understood as session, and can save the state of the user. But if the user closes the browser or the client does not make a request to the server for a preset period of time, the session object will automatically disappear. The session object is used for recording the access state of each client, tracking the operation state of each client and storing the information of the user, and the user knows that the client is the same client through the method. Since the session ID is stored in the cookie of the browser, the requirement for using the session object necessitates that the user browser support the cookie.
In order to better understand the process of the sending method of the response information, the following describes a flow of the implementation method of sending the response information with reference to an optional embodiment, but the flow is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a method for sending response information is provided, and fig. 3 is a timing chart of the method for sending response information according to the embodiment of the present application, and as shown in fig. 3, the following steps are specifically performed:
step S301: a user logs in a main application;
step S302: the server checks the account password, logs in for the first time, and distributes an identity token for the user;
step S303: completing login;
step S304: a user sends a request for requesting the authorization of the sub-application through the main application;
step S305: requesting to authorize the sub-application through a third-party platform, wherein the third-party platform can be understood as a platform of the sub-application;
step S306: requesting user confirmation;
step S307: user confirmation;
step S308: requesting user information at a third party platform using the identity token;
step S309: and checking the identity token and giving the user information to the main application.
In an embodiment, fig. 4 is a platform architecture diagram of a sending method of response information according to an embodiment of the present application, as shown in fig. 4, a development application platform, an operation platform, a support platform, a monitoring platform, and the like of a sub application are accessed into a main application, all sub application permissions are allocated and maintained in the main application, and since sub application menu permissions and node permissions are stored locally, sub application page menus and element node permissions of the main application are controlled.
In one embodiment, fig. 5 is an architecture diagram of a sub-application according to an embodiment of the present application, a, assigning sub-application access rights to a main application; b. distributing the menu authority of the sub-application to the main application, and controlling the page access authority; c. a plurality of elements exist under the menu to control the operation of the page dom node; d. there are also several interfaces under each element to realize the interface data layer authority control.
The embodiment of the invention provides a multi-application access secret-free authorization method, which comprises the following specific implementation processes: the user logs in through the main application, an identity token is distributed for the user when the user logs in for the first time, the user enters other sub-applications, the identity token is subjected to time efficiency verification, the identity token effectively and directly enters a sub-application home page, secret-free logging is achieved, and the identity token is out of work and jumps to the main application home page for logging in. If the login is successful, the corresponding menu access authority is distributed to the user, the page route is added with the identifier, then the route is intercepted and the identifier is judged, so that whether the page has the authority access or not is limited, and the DOM node in the page realizes the authority control through the identifier. And binding the created element identifier and the interface, thereby realizing the interface access authority.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
Fig. 6 is a block diagram of a device for transmitting response information according to an embodiment of the present application; as shown in fig. 6, includes:
a receiving module 62, configured to receive a login request sent by a terminal through a main application and used for logging in a sub-application, where the login request includes: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
a determining module 64, configured to determine, under a condition that the first identity token of the main application is determined to be valid, a control authority of the sub-application corresponding to the user information, and determine, according to the control authority, a first page resource corresponding to the sub-application;
a sending module 66, configured to send first response information to the terminal, so that the terminal displays a target page of the sub-application according to the first page resource in the response information when logging in the sub-application.
Through the device, a login request which is sent by a terminal through a main application and used for logging in the sub-application is received, wherein the login request comprises the following steps: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application; under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority; and sending first response information to the terminal so that the terminal displays a target page of the sub-application according to first page resources in the response information under the condition of logging in the sub-application, thereby solving the problems of low safety and the like of logging in the sub-application through a main application in the related technology, distributing an identity token for the user when logging in for the first time, carrying out identity token aging verification on the user when entering other sub-applications, enabling the identity token to effectively and directly enter a sub-application home page, realizing password-free logging, and skipping the identity token to the main application home page for logging in when failing. And if the login is successful, the control authority of the sub-application is distributed to the user, and the first page resource corresponding to the sub-application is determined according to the control authority.
In an exemplary embodiment, the determining module 64 is configured to determine whether the terminal has the access right of the sub-application according to the user information and the uniform resource locator of the sub-application, and in a case that the terminal has the access right of the sub-application, determine a menu right of the sub-application corresponding to the user information, where the control right includes: the access rights and the menu rights; a determining module 64, configured to determine, according to the menu permission, a target menu in a target page of the sub-application, an operation control in the target menu, and a target interface corresponding to the operation control, where the operation control is used to operate the target page, and the terminal jumps to another page through the target interface.
That is to say, in the embodiment of the present application, whether a user has an access right to a sub-application is determined according to user information and a uniform resource locator of the sub-application, and when the user does not have the access right to the sub-application, the user is denied access to the sub-application.
Under the condition that the user has access authority to the sub-application, determining menu authority corresponding to the user, and determining a target menu in a target page of the sub-application, an operation control in the target menu and a target interface corresponding to the operation control according to the menu authority; and binding the operation control with the target interface corresponding to the operation control, thereby realizing the interface access authority.
In an exemplary embodiment, the determining module 64 is configured to establish a binding relationship between the operation control and the target interface; and under the condition that the operation control is determined according to the menu authority, determining a target interface corresponding to the operation control according to the binding relationship.
It should be noted that, before determining the interface corresponding to the menu authority, a binding relationship between the operation control and the target interface needs to be established, and then, under the condition that the menu authority corresponding to the user is determined, the corresponding operation control is determined according to the menu authority, and the target interface corresponding to the menu authority is determined according to the binding relationship between the operation control and the target interface.
In an exemplary embodiment, the apparatus further includes a configuration module, configured to configure a communication interface between the main application and the sub-application, so that the main application logs in the sub-application through the communication interface; configuring a base container of the main application to enable the main application to access a platform of the sub-application through the base container, wherein the platform at least comprises: the system comprises a development application platform, an operation platform, a support platform and a monitoring platform.
According to the embodiment of the application, a development application platform, an operation platform, a support platform, a monitoring platform and the like of the sub-application are accessed into the main application, and all the permissions of the sub-application are distributed in the main application for maintenance, namely the permissions of the sub-application can be controlled through the main application, and the permissions can be understood as whether to access an address book, whether to acquire the position information of a user and the like.
In an exemplary embodiment, the receiving module 62 is further configured to receive an operation command sent by the terminal, where the operation command is used to instruct the main application to modify the permission setting of the sub-application through the platform; and modifying the permission setting of the sub-application according to the operation command.
That is, since the development application platform, the operation platform, the support platform, the monitoring platform, and the like of the sub-application are accessed to the main application, and all the permissions of the sub-application are allocated to and maintained in the main application, the user can modify the permissions of the sub-application through the main application, and modify the permission device of the sub-application according to the operation command when receiving the operation command that the user modifies the permissions of the sub-application through the main application.
For example, when the authority of the sub-application is that the address book is not allowed to be accessed, and when an operation command of a user is received, the "not allowed to be accessed" is modified to "allowed to be accessed", it should be noted that this embodiment is only for better understanding of the present invention, and the authority of the sub-application is not limited in the embodiment of the present invention.
In an exemplary embodiment, the determining module 64 is configured to determine whether the first identity token of the primary application is valid; determining a second page resource of a landing page of the primary application if the first identity token of the primary application is invalid; and sending second response information to the terminal so that the terminal displays the login page of the main application according to a second page resource in the second response information.
Specifically, when a user logs in a primary application, a server verifies an account password on a login page, the primary application is logged in for the first time, an identity token is distributed for the user, inquiry data of the identity token are carried, and the data return front end is stored locally; the main application enters other sub-applications, the user is subjected to identity token aging verification, the identity token effectively and directly enters the page of the sub-applications, secret-free login is achieved, the identity token is invalid and jumps to the main application home page login, and therefore the technical effects that the main application login is successful and the sub-applications are free from login and access are achieved.
In an exemplary embodiment, the receiving module 62 is further configured to receive user login information sent by the target object through a login page of the host application; and under the condition that the user login information is verified, sending a second identity token to the master application so that the master application stores the second identity token in a session object.
That is to say, when the identity token is invalid, the primary application jumps to log in to the home page, the server checks the account password on the login page, the primary application logs in for the first time and allocates an identity token for the user, and the primary application stores the second identity token in the session object.
Wherein, the session object can be understood as session, and can save the state of the user. But if the user closes the browser or the client does not make a request to the server within a preset time period, the session object automatically disappears. The session object is used for recording the access state of each client, tracking the operation state of each client and storing the information of the user, and the user knows that the client is the same client by the method. Since the session ID is stored in the cookie of the browser, the requirement for using the session object necessitates that the user browser support the cookie.
Embodiments of the present application further provide a storage medium including a stored program, where the program executes the method of any one of the above.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, receiving a login request which is sent by a terminal through a main application and used for logging in a sub-application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
s2, under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority;
and S3, sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition that the terminal logs in the sub-application.
Embodiments of the present application further provide an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, receiving a login request which is sent by a terminal through a main application and used for logging in a sub-application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
s2, under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority;
and S3, sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition that the terminal logs in the sub-application.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, for a specific example in this embodiment, reference may be made to the examples described in the above embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for transmitting response information, comprising:
receiving a login request which is sent by a terminal through a main application and used for logging in a sub-application, wherein the login request comprises: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
under the condition that the first identity token of the main application is determined to be valid, determining the control authority of the sub-application corresponding to the user information, and determining the first page resource corresponding to the sub-application according to the control authority;
and sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition that the terminal logs in the sub-application.
2. The method according to claim 1, wherein the response message is transmitted from the mobile station,
determining the control authority of the sub-application corresponding to the user information, including: determining whether the terminal has the access authority of the sub-application according to the user information and the uniform resource locator of the sub-application, and determining the menu authority of the sub-application corresponding to the user information under the condition that the terminal has the access authority of the sub-application, wherein the control authority comprises: the access rights and the menu rights;
determining a first page resource corresponding to the sub-application according to the control authority, including: and determining a target menu in a target page of the sub-application, an operation control in the target menu and a target interface corresponding to the operation control according to the menu authority, wherein the operation control is used for operating the target page, and the terminal jumps to other pages through the target interface.
3. The method for sending the response message according to claim 2, wherein determining the target interface corresponding to the operation control according to the menu permission comprises:
establishing a binding relationship between the operation control and the target interface;
and under the condition that the operation control is determined according to the menu authority, determining a target interface corresponding to the operation control according to the binding relationship.
4. The method according to claim 1, wherein before receiving the login request for logging in the sub-application sent by the terminal through the main application, the method further comprises:
configuring a communication interface of the main application and the sub-application so that the main application logs in the sub-application through the communication interface;
configuring a base container of the main application to enable the main application to access a platform of the sub-application through the base container, wherein the platform at least comprises: the system comprises a development application platform, an operation platform, a support platform and a monitoring platform.
5. The method according to claim 1, wherein after configuring the base container of the main application to enable the main application to access the platform of the sub-application through the base container, the method further comprises:
receiving an operation command sent by the terminal, wherein the operation command is used for indicating the main application to modify the authority setting of the sub-application through the platform;
and modifying the permission setting of the sub-application according to the operation command.
6. The method according to claim 1, wherein after receiving a login request for logging in to the sub-application, the login request being sent by the terminal through the main application, the method further comprises:
determining whether a first identity token of the primary application is valid;
determining a second page resource of a landing page of the primary application if the first identity token of the primary application is invalid;
and sending second response information to the terminal so that the terminal displays the login page of the main application according to a second page resource in the second response information.
7. The method according to claim 1, wherein after sending the second response message to the terminal, the method further comprises:
receiving user login information sent by a target object through a login page of the main application;
and under the condition that the user login information is verified, sending a second identity token to the master application so that the master application stores the second identity token in a session object.
8. An apparatus for transmitting a response message, comprising:
a receiving module, configured to receive a login request sent by a terminal through a main application and used for logging in a sub-application, where the login request includes: the method comprises the steps that a first identity token of a main application, user information of the main application and a uniform resource locator of a sub-application are included, and the sub-application is an application which is allowed to log in from the main application;
the determining module is used for determining the control authority of the sub-application corresponding to the user information under the condition that the first identity token of the main application is determined to be valid, and determining the first page resource corresponding to the sub-application according to the control authority;
and the sending module is used for sending first response information to the terminal so that the terminal displays a target page of the sub-application according to the first page resource in the response information under the condition of logging in the sub-application.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202210891930.5A 2022-07-27 2022-07-27 Response information transmission method and apparatus, storage medium, and electronic apparatus Pending CN115473670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210891930.5A CN115473670A (en) 2022-07-27 2022-07-27 Response information transmission method and apparatus, storage medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210891930.5A CN115473670A (en) 2022-07-27 2022-07-27 Response information transmission method and apparatus, storage medium, and electronic apparatus

Publications (1)

Publication Number Publication Date
CN115473670A true CN115473670A (en) 2022-12-13

Family

ID=84365910

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210891930.5A Pending CN115473670A (en) 2022-07-27 2022-07-27 Response information transmission method and apparatus, storage medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN115473670A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150106905A1 (en) * 2013-10-14 2015-04-16 Alibaba Group Holding Limited Login method for client application and corresponding server
EP3136682A1 (en) * 2015-08-25 2017-03-01 Tech Mahindra Limited Systems and methods to achieve interworking between rcs and non-rcs networks
CN108768970A (en) * 2018-05-15 2018-11-06 腾讯科技(北京)有限公司 A kind of binding method of smart machine, identity authentication platform and storage medium
CN112769798A (en) * 2020-12-30 2021-05-07 中国农业银行股份有限公司 Login method and device
CN113688343A (en) * 2021-07-23 2021-11-23 济南浪潮数据技术有限公司 Page permission control method, device, equipment and readable storage medium
CN113806657A (en) * 2021-09-10 2021-12-17 济南浪潮数据技术有限公司 Page loading method, system, equipment and storage medium based on micro front-end architecture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150106905A1 (en) * 2013-10-14 2015-04-16 Alibaba Group Holding Limited Login method for client application and corresponding server
EP3136682A1 (en) * 2015-08-25 2017-03-01 Tech Mahindra Limited Systems and methods to achieve interworking between rcs and non-rcs networks
CN108768970A (en) * 2018-05-15 2018-11-06 腾讯科技(北京)有限公司 A kind of binding method of smart machine, identity authentication platform and storage medium
CN112769798A (en) * 2020-12-30 2021-05-07 中国农业银行股份有限公司 Login method and device
CN113688343A (en) * 2021-07-23 2021-11-23 济南浪潮数据技术有限公司 Page permission control method, device, equipment and readable storage medium
CN113806657A (en) * 2021-09-10 2021-12-17 济南浪潮数据技术有限公司 Page loading method, system, equipment and storage medium based on micro front-end architecture

Similar Documents

Publication Publication Date Title
CN112738805B (en) Device control method and apparatus, storage medium, and electronic device
CN107995215B (en) Control method and device of intelligent household equipment and cloud platform server
CN110944330B (en) MEC platform deployment method and device
US9596501B2 (en) Remote control processing method, device and system
US9246921B1 (en) Secure external access to device automation system
CN107784221B (en) Authority control method, service providing method, device and system and electronic equipment
CN104917762B (en) Authority distribution method, first electronic equipment and system
CN111353141B (en) Intelligent device authority control method, server, user side device and electronic device
EP3007385B1 (en) Terminal peripheral control method, m2m gateway, and communications system
EP3491805B1 (en) System and method for configuration of a connected device connection
US11356434B2 (en) Technical layer for portable electronic assistant
CN105306320A (en) Method and device for binding clients to intelligent device
CN108810129A (en) Internet of Things network control system and method, terminal device and local network services equipment
CN112817248B (en) Shared equipment management method and device, storage medium and electronic device
US20150256544A1 (en) Method and Device for Gateway Managing Terminal
CN107241332B (en) Gateway authority processing method and device
CN112953986B (en) Edge application management method and device
CN115473670A (en) Response information transmission method and apparatus, storage medium, and electronic apparatus
CN105553675A (en) Method and apparatus for logging in router
KR20140121571A (en) System for intergrated authentication, method and apparatus for intergraged authentication thereof
CN110231965B (en) Cloud device, application processing method and electronic device
CN105376274A (en) Login processing method, device and system
CN111638882B (en) Method and device for generating operation interface, storage medium and processor
CN114500617B (en) Internet equipment control method and device, storage medium and electronic equipment
CN115473754A (en) Multi-system access management method and device and multi-system management platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination