CN114760139A - Login state synchronization method and device, electronic equipment and computer storage medium - Google Patents

Login state synchronization method and device, electronic equipment and computer storage medium Download PDF

Info

Publication number
CN114760139A
CN114760139A CN202210420960.8A CN202210420960A CN114760139A CN 114760139 A CN114760139 A CN 114760139A CN 202210420960 A CN202210420960 A CN 202210420960A CN 114760139 A CN114760139 A CN 114760139A
Authority
CN
China
Prior art keywords
application system
login state
domain name
state identifier
interface
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.)
Withdrawn
Application number
CN202210420960.8A
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.)
Beijing Jindi Technology Co Ltd
Original Assignee
Beijing Jindi Technology 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 Beijing Jindi Technology Co Ltd filed Critical Beijing Jindi Technology Co Ltd
Priority to CN202210420960.8A priority Critical patent/CN114760139A/en
Publication of CN114760139A publication Critical patent/CN114760139A/en
Withdrawn 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/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents
    • 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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Engineering (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a login state synchronization method, a login state synchronization device, electronic equipment and a computer storage medium, and the method comprises the following steps: acquiring a login state identifier of a first application system, and executing a first operation of setting the login state identifier acquired from the first application system under a domain name or a main domain name of a second application system under the condition that a target user is logged in the first application system by the login state identifier; and/or under the condition that the login state identification represents that the target user logs out of the first application system, executing a second operation of removing or setting the login state identification under the domain name or the main domain name of the second application system to be a null value. Therefore, the system login state synchronization under different domain names can be realized under the condition of not needing to perform intermediate verification by a third-party system.

Description

Login state synchronization method and device, electronic equipment and computer storage medium
Technical Field
The embodiment of the application relates to the technical field of internet, in particular to a login state synchronization method and device, electronic equipment and a computer storage medium.
Background
At present, more and more people select to use the same account to log in different application systems, however, the application systems under different domain names cannot share the login state, so that a user needs to repeatedly log in different application systems by using the same account, and the use experience of the user is reduced.
At present, the login state synchronization operation of application systems under different domain names is usually realized by a Single Sign On (SSO) system. Specifically, when a user accesses the application system a, if the application system a is currently in an unregistered state, the user jumps to a Single Sign On (SSO) system to log in, and if the login information provided by the user passes verification, an authentication credential is returned to the user, so that when the user accesses the application system B, the application system B automatically transmits the authentication credential of the user to the SSO system to verify after receiving an access request of a target user, and if the login information passes verification, the user can automatically log in the application system B.
However, the above login state synchronization operation needs to be intermediately checked by an independent third party system (SSO system), and there is a potential safety hazard of data leakage, so how to implement login state synchronization operations of application systems under different domain names without the help of a third party system is a technical problem to be solved by the present application.
Disclosure of Invention
In view of the above, the present application provides a login state synchronization technical solution to at least partially solve the above problems.
According to a first aspect of an embodiment of the present application, a login state synchronization method is provided, including: acquiring a login state identifier of a first application system; executing a first operation under the condition that the login state identification represents that a target user has logged in the first application system; and/or executing a second operation under the condition that the login state identifier represents that the target user logs out of the first application system; wherein: the first operation includes: creating a first HTML tag; requesting a first interface of a second application system for setting a login state identifier by using the resource attribute of the first HTML label, and transmitting the login state identifier of the first application system to the first interface, so that a server or a client of the second application system sets the login state identifier obtained by the first interface under a domain name or a main domain name of the second application system after the login state identifier of the first application system is obtained by the first interface of the second application system; the second operation includes: creating a second HTML tag; and requesting a second interface of a second application system for removing the login state identification by using the resource attribute of the second HTML label, so that the server or the client of the second application system removes or sets the login state identification of the domain name or the main domain name of the second application system to be a null value.
According to a second aspect of the embodiments of the present application, there is provided a login state synchronization apparatus, including: the acquisition module is used for acquiring a login state identifier of the first application system; the synchronization module is used for executing a first operation under the condition that the login state identifier represents that a target user has logged in the first application system; and/or executing a second operation under the condition that the login state identification represents that the target user logs out of the first application system; wherein the first operation comprises: creating a first HTML tag; requesting a first interface of a second application system for setting a login state identifier by using the resource attribute of the first HTML label, and transmitting the login state identifier of the first application system to the first interface, so that a server or a client of the second application system sets the login state identifier obtained by the first interface under a domain name or a main domain name of the second application system after the login state identifier of the first application system is obtained by the first interface of the second application system; the second operation includes: creating a second HTML tag; and requesting a second interface of a second application system for removing the login state identification by using the resource attribute of the second HTML label, so that the server or the client of the second application system removes or sets the login state identification of the domain name or the main domain name of the second application system to be a null value.
According to a third aspect of embodiments of the present application, there is provided an electronic apparatus, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus; the memory is configured to store at least one executable instruction, where the executable instruction causes the processor to perform an operation corresponding to the login state synchronization method according to the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a computer storage medium having a computer program stored thereon, which when executed by a processor, is capable of implementing the login state synchronization method according to the first aspect.
In summary, the login state synchronization method, the login state synchronization device, the electronic device and the computer storage medium provided by the application can realize the login state synchronization of the application systems under different domain names without intermediate authentication by means of a third-party system, so that the use experience of users can be improved, the data flow can be reduced, and the data use safety can be improved.
Drawings
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, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a processing flow diagram of a login state synchronization method according to an exemplary embodiment of the present application.
Fig. 2 is a flowchart illustrating a log-on synchronization method according to another exemplary embodiment of the present application.
Fig. 3 is a flowchart illustrating a log-on synchronization method according to another exemplary embodiment of the present application.
Fig. 4 is a block diagram of a login state synchronization apparatus according to an exemplary embodiment of the present application.
Fig. 5 is a block diagram of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present application are shown in the drawings, it should be understood that the present application may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are for illustration purposes only and are not intended to limit the scope of the present application.
It should be understood that the various steps recited in the method embodiments of the present application may be performed in a different order and/or in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present application is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present application are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this application are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise. The names of messages or information exchanged between a plurality of devices in the embodiments of the present application are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The following further describes specific implementations of embodiments of the present application with reference to the drawings of the embodiments of the present application.
Fig. 1 shows a processing flow of a login state synchronization method according to an exemplary embodiment of the present application.
The login state synchronization method provided by the embodiment can be applied to a scene of synchronizing login states between two application systems or between three application systems. However, the present invention is not limited to this, and may be applied to login state synchronization operations between three or more application systems.
As shown in the figure, the present embodiment mainly includes the following steps:
step S102, obtaining the login state identifier of the first application system, and continuing to execute step S104 and/or step S106.
Alternatively, the login state identifier of the first application system may be obtained from a domain name or a main domain name of the first application system.
In this embodiment, the domain name of the first application system is, for example, ***.com, and the main domain name of the first application system is, for example, ***.com.
In this embodiment, the login status identifier may be used to indicate that the target user has logged in to the first application system, or to indicate that the target user has logged out of the first application system. Illustratively, when the assignment of the login state identifier is a cookie value returned by the user logging in the first application system, this indicates that the user has logged in the first application system; when the assignment value of the login state identification is a null value returned by the user logging out of the first application system, the user is represented to log out of the first application system at the moment.
In this embodiment, it may be checked whether a login cookie exists under the domain name or the main domain name of the first application system, if so, a determination result that the target user has logged in the first application system may be obtained, and if not, a determination result that the target user has logged out of the first application system may be obtained.
And step S104, executing a first operation under the condition that the login state identifier represents that the target user has logged in the first application system.
Specifically, if the current value of the login state identifier represents that the target user is currently in the condition of having logged in the first application system, a first operation may be executed, so that the target user can log in the second application system synchronously. It should be understood that the first application system and the second application system may be two office systems of the same enterprise. Through the embodiment of the disclosure, under the condition that the enterprise employee logs in one application system, the enterprise employee can log in another or other application systems quickly and conveniently.
Referring to fig. 2, the first operation of the present embodiment may include the steps of:
at step 202, a first HTML tag is created.
Optionally, the first HTML tag may include at least one of an < img > element, a < video > element, an < audio > element, an < object > element, an < embed > element, and an < applet > element, such that the created first HTML tag may implement embedding of cross-domain resources using a cross-domain resource embedding policy, thereby implementing cross-synchronization of the login state identification of one application system to other application systems.
Preferably, the first HTML tag may be an < img > element. For example, the image object may be directly created using the JS language without modifying a resource attribute (e.g., src attribute) of the image object.
And step S204, requesting a first interface of the second application system for setting the login state identification by using the resource attribute of the first HTML label, and transmitting the login state identification of the first application system to the first interface.
In this embodiment, the domain name of the second application system is different from the domain name of the first application system, and the main domain name of the second application system is also different from the main domain name of the first application system.
Optionally, the src attribute of the < img > element may be used to request the first interface of the second application system for setting the login-state cookie, and the login-state identifier of the first application system is transferred to the first interface of the second application system, so as to implement the transfer of the login-state identifier between different application systems under different domain names/main domain names.
In this embodiment, the domain name of the second application system is the same as the first domain name of the first interface of the second application system, where the login state identifier is set.
Step S206, after the server or the client of the second application system obtains the login state identifier of the first application system at the first interface of the second application system, the login state identifier obtained at the first interface is set under the domain name or the main domain name of the second application system.
Optionally, after the first interface of the second application system obtains the login state identifier of the first application system, the client of the second application system directly sets the login state identifier obtained by the first interface under the domain name or the main domain name of the second application system, so that the target user can synchronously log in the second application system.
Preferably, after the first interface of the second application system obtains the login state identifier of the first application system, the client of the second application system may send a request to the server, so that the server responds to the request of the client of the second application system, and the login state identifier obtained by the first interface is set under the domain name or the main domain name of the second application system, so that the target user can log in the second application system synchronously.
Optionally, the attribute may be set by setting the login state identifier in the response header, so as to set the login state identifier of the first application system obtained by the first interface under the domain name or the main domain name of the second application system, thereby implementing automatic login of the target user to the second application system.
For example, the login state identification obtained from the first application system may be set under a domain name or a main domain name of the first application system by setting a set-cookie attribute in the response header to enable synchronous login of the second application system.
And step S106, executing a second operation under the condition that the login state identifier represents that the target user logs out of the first application system.
Specifically, if the login state identifier indicates that the target is currently logged out of the first application system, a second operation may be performed, so that the target user may log out of the second application system synchronously.
Referring to fig. 3, the second operation of the present embodiment may include the following steps:
step 302, create a second HTML tag.
Optionally, the second HTML tag may include at least one of an < img > element, a < video > element, an < audio > element, an < object > element, an < embed > element, and an < applet > element.
Preferably, the second HTML tag may be an < img > element. For example, the image object may be directly created using the JS language without modifying the resource attribute (e.g., src attribute) of the image object.
And step S304, requesting a second interface of the second application system for removing the login state identifier by using the resource attribute of the second HTML label.
In this embodiment, the domain name of the second application system is different from the domain name of the first application system, and the main domain name of the second application system is also different from the main domain name of the first application system.
Optionally, a second interface of the second application system to remove the login state identification may be requested using the src attribute of the < img > element.
In this embodiment, the domain name of the second application system is the same as the domain name of the second interface of the second application system from which the login state identifier is removed.
Step S306, the server or the client of the second application system removes or sets the domain name of the second application system or the login status identifier under the main domain name to a null value.
Optionally, after the second interface of the second application system that removes the login state identifier receives the request of the second HTML tag of the first application system, the client of the second application system directly removes or sets the login state identifier of the domain name or the main domain name of the second application system to a null value, so that the target user logs out of the second application system synchronously.
Preferably, after the second interface of the second application system that removes the login state identifier receives the request of the second HTML tag of the first application system, the client of the second application system sends the request to the server, so that the server responds to the request of the client of the second application system to remove or set the login state identifier of the domain name or the main domain name of the second application system to a null value.
Optionally, the domain name of the second application system or the login state identifier under the main domain name may be removed or set to a null value by setting the login state identifier setting attribute in the response header, so that the target user logs out of the second application system synchronously.
For example, a synchronous logout of the second application system may be achieved by removing the set-cookie attribute in the response header or setting the set-cookie attribute in the response header to null.
It should be noted that, in the first operation (or referred to as synchronous login operation) executed in step S104, the login state identifier of the first application system needs to be transferred to the second application system, and in the second operation (or referred to as synchronous logout operation) executed in step S106, the transfer operation of the login state identifier does not need to be executed, and after the resource attribute request of the second HTML tag of the first application system is received by the second interface of the second application system, where the login state identifier is removed, the login state identifier of the domain name or the main domain name of the second application system is removed or set to be null.
In other embodiments, the first operation may also be executed by obtaining the login state identifier of the second application system, and under the condition that the login state identifier represents that the target user has logged in the second application system; and/or executing a second operation under the condition that the login state identifier represents that the target user logs out of the second application system, so that the first application system can realize login state synchronous operation according to the login state identifier of the second application system.
In this embodiment, the domain name of the first application system is the same as the domain name of the interface of the first application system for setting the login state identifier and the domain name of the interface of the first application system for removing the login state identifier.
To sum up, the login state synchronization method, the login state synchronization apparatus, the electronic device, and the computer storage medium provided in the embodiments of the present application perform a first operation of setting a login state identifier obtained from a first application system in a domain name or a main domain name of a second application system by obtaining the login state identifier of the first application system and, when the login state identifier indicates that a target user has logged in the first application system; and/or under the condition that the login state identification represents that the target user logs out of the first application system, executing a second operation of removing or setting the login state identification under the domain name or the main domain name of the second application system to be a null value. Therefore, the login state synchronization between the application systems under different domain names can be realized under the condition that the intermediate verification is not needed by means of a third-party system, so that the use experience of a user is improved, and the data use safety is improved.
According to the login state synchronization method provided by the embodiment of the application, the first HTML tag or the second HTML tag which accords with the cross-domain resource embedding strategy is constructed by at least one of the < img > element, the < video > element, the < audio > element, the < object > element, the < embed > element and the < applet > element, so that the synchronization operation between the application systems under different domain names is realized.
According to the login state synchronization method provided by the embodiment of the application, the login state identification obtained by the first interface is set under the domain name or the main domain name of the second application system by setting the login state identification setting attribute in the response header; and/or setting the attribute of the login state identifier in the response header, and removing or setting the login state identifier of the domain name or the main domain name of the second application system as a null value, so as to realize the login state synchronization of the second application system according to the login state identifier of the first application system.
According to the method and the device, the first interface of the second application system, which is the same as the domain name of the second application system, for setting the login state identification or the second interface of the second application system for removing the login state identification is set, so that the first interface and the second interface can directly receive the request of the first application system, and synchronous login or synchronous logout of the second application system is realized under the condition that verification is not required by a third-party system.
According to the embodiment of the application, the interface of the first application system for setting the login state identifier or the interface of the first application system for removing the login state identifier, which is the same as the domain name of the first application system, is set, so that the first application system can realize the technical effect of login state synchronization according to the login state identifier of the second application system.
The login state synchronization technical scheme provided by the embodiment of the application can obviously simplify the operation flow of login state synchronization when being applied to login state synchronization between 2 to 3 application systems.
Fig. 4 shows a block diagram of a login state synchronization apparatus according to an exemplary embodiment of the present application. As shown, the login-state synchronization apparatus 400 of the present embodiment mainly includes an obtaining module 402 and a synchronization module 404.
The obtaining module 402 is used for obtaining the login state identifier of the first application system
The synchronization module 404 is configured to execute a first operation when the login state identifier indicates that the target user has logged in the first application system; and/or executing a second operation under the condition that the login state identifier represents that the target user logs out of the first application system; wherein the first operation comprises: creating a first HTML tag; requesting a first interface of a second application system for setting a login state identifier by using the resource attribute of the first HTML label, and transmitting the login state identifier of the first application system to the first interface, so that a server or a client of the second application system sets the login state identifier obtained by the first interface under a domain name or a main domain name of the second application system after the login state identifier of the first application system is obtained by the first interface of the second application system; the second operation includes: creating a second HTML tag; and requesting a second interface of the second application system for removing the login state identification by using the resource attribute of the second HTML label, so that the server or the client of the second application system removes or sets the login state identification of the domain name or the main domain name of the second application system to be a null value.
Optionally, the first HTML tag includes: at least one of a < img > element, a < video > element, an < audio > element, an < object > element, an < embed > element, and an < applet > element; the second HTML tag includes: at least one of an < img > element, a < video > element, an < audio > element, an < object > element, an < embedded > element, and an < applet > element.
Optionally, the obtaining module 404 is further configured to: and acquiring the login state identification of the first application system from the domain name or the main domain name of the first application system.
Optionally, the synchronization module 404 is further configured to: in a first operation: setting the login state identification obtained by the first interface under the domain name or the main domain name of the second application system by setting the login state identification setting attribute in the response header; and/or in a second operation: and removing or setting the login state identifier of the second application system or the login state identifier under the main domain name as a null value by setting the login state identifier setting attribute in the response header.
Optionally, the domain name of the first application system is different from the domain name of the second application system; the primary domain name of the first application system is also different from the primary domain name of the second application system.
Optionally, the domain name of the first application system is the same as the domain name of the interface of the first application system, where the login state identifier is set, and the domain name of the interface of the first application system, where the login state identifier is removed; the domain name of the second application system is the same as the first domain name of the first interface of the second application system, which is provided with the login state identifier, and the domain name of the second interface of the second application system, which is removed from the login state identifier.
Optionally, the login state synchronization apparatus 400 is applied to a scenario of synchronizing login states between two application systems or between three application systems.
Another embodiment of the present disclosure provides an electronic device, including: the device comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus.
Fig. 5 shows a schematic architecture diagram of an electronic device 500 of the present invention, and as shown in the figure, the electronic device 500 of the present embodiment may include a processor (processor) 502, a communication interface (communication interface)504, and a memory (memory) 506.
The processor 502, communication interface 504, and memory 506 may communicate with one another via a communication bus 508.
The communication interface 504 is used for communication with other electronic devices such as a terminal device or a server.
The processor 502, configured to execute the computer program 510, may specifically perform the relevant steps in the embodiments of the methods described above, that is, perform the steps in the login state synchronization method described in the embodiments described above
In particular, the computer program 510 may comprise program code comprising computer operating instructions.
The processor 502 may be a central processing unit CPU, or an application specific Integrated circuit asic, or one or more Integrated circuits configured to implement an embodiment of the present invention. The electronic device comprises one or more processors, which can be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.
A memory 506 for storing a computer program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Fifth embodiment
A fifth embodiment of the present disclosure provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the login state synchronization method described in the above embodiments can be implemented.
It should be noted that, according to the implementation requirement, each component/step described in the embodiment of the present application may be divided into more components/steps, and two or more components/steps or partial operations of the components/steps may also be combined into a new component/step to achieve the purpose of the embodiment of the present application.
The above-described methods according to the embodiments of the present application may be implemented in hardware, firmware, or as software or computer code that may be stored in a recording medium such as a CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk, or as computer code downloaded through a network, originally stored in a remote recording medium or a non-transitory machine-readable medium, and to be stored in a local recording medium, so that the methods described herein may be stored in such software processes on a recording medium using a general purpose computer, a dedicated processor, or programmable or dedicated hardware such as an ASIC or FPGA. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when accessed and executed by a computer, processor, or hardware, implements the login state synchronization methods described herein. Further, when a general-purpose computer accesses code for implementing the login-state methods illustrated herein, execution of the code transforms the general-purpose computer into a special-purpose computer for performing the login-state methods illustrated herein.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The above embodiments are only used for illustrating the embodiments of the present application, and not for limiting the embodiments of the present application, and those skilled in the relevant art can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application, so that all equivalent technical solutions also belong to the scope of the embodiments of the present application, and the scope of patent protection of the embodiments of the present application should be defined by the claims.

Claims (10)

1. A login state synchronization method comprises the following steps:
acquiring a login state identifier of a first application system;
executing a first operation under the condition that the login state identification represents that a target user has logged in the first application system; and/or
Executing a second operation under the condition that the login state identification represents that the target user logs out of the first application system;
wherein:
the first operation includes: creating a first HTML tag; requesting a first interface of a second application system for setting a login state identifier by using the resource attribute of the first HTML label, and transmitting the login state identifier of the first application system to the first interface, so that a server or a client of the second application system sets the login state identifier obtained by the first interface under a domain name or a main domain name of the second application system after the login state identifier of the first application system is obtained by the first interface of the second application system;
the second operation includes: creating a second HTML tag; and requesting a second interface of a second application system for removing the login state identifier by using the resource attribute of the second HTML label, so that the server or the client of the second application system removes or sets the login state identifier of the second application system or the login state identifier under the main domain name to be a null value.
2. The method of claim 1, wherein:
the first HTML tag includes: at least one of a < img > element, a < video > element, an < audio > element, an < object > element, an < embed > element, and an < applet > element; and/or
The second HTML tag includes: at least one of an < img > element, a < video > element, an < audio > element, an < object > element, an < embedded > element, and an < applet > element.
3. The method of claim 1, wherein obtaining the login state identification of the first application system comprises:
and acquiring the login state identification of the first application system from the domain name or the main domain name of the first application system.
4. The method of claim 1, wherein:
in the first operation: setting the login state identification obtained by the first interface under the domain name or the main domain name of the second application system by setting the login state identification setting attribute in the response header; and/or
In the second operation: and removing or setting the login state identifier of the second application system or the login state identifier under the main domain name as a null value by setting the login state identifier setting attribute in the response header.
5. The method of claim 1, wherein:
the domain name of the first application system is different from the domain name of the second application system;
the primary domain name of the first application system is also different from the primary domain name of the second application system.
6. The method of claim 1, wherein:
the domain name of the first application system is the same as the domain name of the interface of the first application system, which is provided with the login state identifier, and the domain name of the interface of the first application system, which is removed from the login state identifier;
the domain name of the second application system is the same as the first domain name of the first interface of the second application system, which is provided with the login state identifier, and the domain name of the second interface of the second application system, which is removed from the login state identifier.
7. The method of claim 1, wherein the login state synchronization method is applied to a scenario of synchronizing login states between two application systems or between three application systems.
8. A log-in state synchronization apparatus, comprising:
the acquisition module is used for acquiring a login state identifier of the first application system;
the synchronization module is used for executing a first operation under the condition that the login state identifier represents that a target user has logged in the first application system; and/or executing a second operation under the condition that the login state identification represents that the target user logs out of the first application system;
wherein the first operation comprises: creating a first HTML tag; requesting a first interface of a second application system for setting a login state identifier by using the resource attribute of the first HTML label, and transmitting the login state identifier of the first application system to the first interface, so that a server or a client of the second application system sets the login state identifier obtained by the first interface under a domain name or a main domain name of the second application system after the login state identifier of the first application system is obtained by the first interface of the second application system;
the second operation includes: creating a second HTML tag; and requesting a second interface of a second application system for removing the login state identifier by using the resource attribute of the second HTML label, so that the server or the client of the second application system removes or sets the login state identifier of the second application system or the login state identifier under the main domain name to be a null value.
9. An electronic device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface are communicated with each other through the communication bus;
the memory is used for storing at least one executable instruction, and the executable instruction causes the processor to execute the operation corresponding to the login state synchronization method according to any one of claims 1-7.
10. A computer storage medium having stored thereon a computer program which, when executed by a processor, implements a login state synchronization method as claimed in any one of claims 1 to 7.
CN202210420960.8A 2022-04-21 2022-04-21 Login state synchronization method and device, electronic equipment and computer storage medium Withdrawn CN114760139A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210420960.8A CN114760139A (en) 2022-04-21 2022-04-21 Login state synchronization method and device, electronic equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210420960.8A CN114760139A (en) 2022-04-21 2022-04-21 Login state synchronization method and device, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN114760139A true CN114760139A (en) 2022-07-15

Family

ID=82331773

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210420960.8A Withdrawn CN114760139A (en) 2022-04-21 2022-04-21 Login state synchronization method and device, electronic equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN114760139A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428179A (en) * 2012-05-18 2013-12-04 阿里巴巴集团控股有限公司 Method, system and device for logging into multi-domain-name website
CN103532919A (en) * 2012-07-06 2014-01-22 腾讯科技(深圳)有限公司 Method and system for maintaining login state of user account
US20140164447A1 (en) * 2012-12-12 2014-06-12 Akamai Technologies Inc. Cookie synchronization and acceleration of third-party content in a web page
CN103888540A (en) * 2014-03-31 2014-06-25 百度在线网络技术(北京)有限公司 Login information synchronization method, synchronized network servers and synchronizing network servers
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN110933084A (en) * 2019-11-29 2020-03-27 深圳乐信软件技术有限公司 Cross-domain shared login state method, device, terminal and storage medium
CN111327598A (en) * 2020-01-21 2020-06-23 深圳前海环融联易信息科技服务有限公司 Project login-free method and device, computer equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103428179A (en) * 2012-05-18 2013-12-04 阿里巴巴集团控股有限公司 Method, system and device for logging into multi-domain-name website
CN103532919A (en) * 2012-07-06 2014-01-22 腾讯科技(深圳)有限公司 Method and system for maintaining login state of user account
US20140164447A1 (en) * 2012-12-12 2014-06-12 Akamai Technologies Inc. Cookie synchronization and acceleration of third-party content in a web page
CN103888540A (en) * 2014-03-31 2014-06-25 百度在线网络技术(北京)有限公司 Login information synchronization method, synchronized network servers and synchronizing network servers
CN110300133A (en) * 2018-03-22 2019-10-01 财付通支付科技有限公司 Cross-domain data transmission method, apparatus, equipment and storage medium
CN110933084A (en) * 2019-11-29 2020-03-27 深圳乐信软件技术有限公司 Cross-domain shared login state method, device, terminal and storage medium
CN111327598A (en) * 2020-01-21 2020-06-23 深圳前海环融联易信息科技服务有限公司 Project login-free method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
张新朝;霍冰鹏;: "基于AJAX的数据跨域传输技术分析", 晋城职业技术学院学报, no. 02 *
戚利娜;: "基于Cookie的同域单点登录的实现", 科技创新与应用, no. 16 *

Similar Documents

Publication Publication Date Title
WO2016006520A1 (en) Detection device, detection method and detection program
KR101795592B1 (en) Control method of access to cloud service for business
CN106357609A (en) User creation method and system, public network server and private cloud equipment
US9219733B2 (en) Software-based aliasing for accessing multiple shared resources on a single remote host
CN107992771B (en) A kind of data desensitization method and device
CN111104675A (en) Method and device for detecting system security vulnerability
JP2007310512A (en) Communication system, service providing server, and user authentication server
CN104796406A (en) Method and device for identifying application
WO2015131524A1 (en) Remote access server method and web server
CN111049946A (en) Portal authentication method, Portal authentication system, electronic equipment and storage medium
CN111182537A (en) Network access method, device and system for mobile application
CN106941418B (en) SSL VPN configuration information synchronization method and device
CN114598750B (en) Data request processing method, device and storage medium
KR20140090279A (en) Service security authentication method and web application server therof
CN109286665B (en) Real-time mobile game long link processing method and device
CN111427703A (en) Industrial data real-time display method and system
CN111327619A (en) Micro-service data exchange method and device
CN114760139A (en) Login state synchronization method and device, electronic equipment and computer storage medium
CN113596105B (en) Content acquisition method, edge node and computer readable storage medium
CN109688140B (en) Information processing method and information processing device
CN110048864B (en) Method and apparatus for authenticating an administrator of a device-specific message group
US11804986B2 (en) Method for the remote management of a device connected to a residential gateway
CN106453573A (en) Method and system for processing CGI request in HTTP server
CN106059989B (en) Server and method for switching execution identity
CN111988298A (en) Data processing method, device and equipment

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220715