HK1180478B - Method and system for multiple domain names session information sharing - Google Patents
Method and system for multiple domain names session information sharing Download PDFInfo
- Publication number
- HK1180478B HK1180478B HK13107470.9A HK13107470A HK1180478B HK 1180478 B HK1180478 B HK 1180478B HK 13107470 A HK13107470 A HK 13107470A HK 1180478 B HK1180478 B HK 1180478B
- Authority
- HK
- Hong Kong
- Prior art keywords
- request
- session identifier
- session
- access request
- synchronization
- Prior art date
Links
Description
Technical Field
The present application relates to the field of computer data sharing technologies, and in particular, to a method and a system for sharing multi-domain name session information.
Background
Generally, users will generate different sessions when accessing different domain names, and in some cases, in order to reduce the amount of access data, session sharing needs to be implemented for the same user accessing different domain names, for example, a main domain name, a sub-domain name, a cross-site domain name or a cross-server domain name, and so on.
At present, a common session sharing scheme is to store all session information in a cookie of a client browser in a cookie manner, so as to implement session sharing of a cluster, synchronize cookies under multiple domain names by using an asynchronous request among the multiple domain names, and implement session sharing. The way of storing the session information in the client browser in a large amount needs to use a large number of cookies, the size and the number of the cookies used by the browser are strictly limited, if the used cookies exceed the limit of the client browser, the client browser can adopt different strategies to discard part of the cookies, and therefore the situations of information loss, user authority loss, login state loss and the like in the user access process are caused.
Meanwhile, in the manner of storing all session information by using cookies, cookie information in an http (hypertext transfer protocol) header needs to be transmitted to the server in each request process of the user, the server writes back the modified cookie information to the client browser through response (feedback), and the whole request process needs to transmit cookies in the whole process, which wastes transmission resources. In addition, in the existing multi-domain name session information synchronization based on cookie storage, when the session information of a user changes, a request needs to be asynchronously initiated to all other domain names needing to share the session to synchronously modify cookies, so that the synchronization efficiency is low and the security is poor under the condition of more independent domain names.
Disclosure of Invention
The application provides a method and a system for sharing multi-domain name session information, which can solve the problems of data loss, low synchronization efficiency and poor safety during multi-domain name session information sharing.
In order to solve the above problem, the present application discloses a method for sharing multi-domain name session information, comprising:
receiving an access request sent by a client;
judging whether the access request contains a session identifier for identifying session information;
if yes, acquiring the session identifier;
if the access request is not contained and the target of the access request is the master station, generating a session identifier and adding the session identifier to the access request;
if the access request is not contained and the target of the access request is a substation, sending a synchronization request to a main station through a synchronization system, if a session identifier can be acquired, adding the session identifier to a target address of the access request, and if the session identifier cannot be acquired, generating the session identifier and writing the session identifier into domain names of the current substation and the main station recorded in a client cookie respectively;
and reading the session information in the cache according to the session identifier.
Further, the method of sending a synchronization request to the master station through the synchronization system comprises:
sending a preliminary request to a synchronization system, wherein the preliminary request comprises a target URL of a current access request;
the synchronization system takes the target URL in the preliminary request as a source address, carries the source address to send a synchronization request to the master station, reads the session identifier from the request head of the synchronization request sent to the master station, adds the session identifier to the source address, and then reinitiates the access request to the source address written with the session identifier.
Further, the reading, according to the obtained session identifier, the corresponding session information in the cache includes:
sending a read request containing the session identifier to a cache;
inquiring session information which is stored and identified by the session identifier in a cache according to the session identifier;
and if the corresponding session information exists, reading the session information.
Further, the reading, according to the obtained session identifier, the corresponding session information in the cache includes:
sending a reading request which takes the session identifier as a request parameter to a proxy server, analyzing the reading request by the proxy server to obtain the session identifier, inquiring session information which takes the session identifier as a storage identifier in a cache according to the session identifier, and if corresponding session information exists, reading the session information by the proxy server;
and receiving the session information analyzed by the proxy server.
Further, the read request sent to the proxy server is sent through a hypertext transfer protocol.
In order to solve the above problem, the present application further discloses a method for sharing multi-domain name session information, comprising the following steps:
receiving an access request aiming at a main station, which is sent by a client;
judging whether the access request aiming at the main station contains a session identifier for identifying session information, if not, generating the session identifier and adding the session identifier into the current access request;
in the same session process, receiving an access request of the access substation sent again by the client;
judging whether the access request aiming at the substation contains a session identifier, if not, sending a synchronization request to the main station through a synchronization system to acquire the session identifier;
and reading the session information in the cache according to the acquired session identifier.
In order to solve the above problem, the present application further discloses a method for sharing multi-domain name session information, comprising the following steps:
receiving an access request aiming at the substation sent by a client;
judging whether the access request aiming at the current substation contains a session identifier for identifying session information, if not, acquiring the session identifier from the main station through the synchronization system, and if the acquired session identifier is empty or cannot be acquired, generating the session identifier through the synchronization system;
the session identifier is added to the substation domain name and the main station domain name simultaneously in a way of writing in a client cookie, so that the synchronization of the session identifier of the current substation and the main station is realized;
in the same session process, receiving an access request sent again by the client;
if the access request aiming at the main station is sent again, the session identifier is read, if the access request aiming at other sub-stations is sent again, whether the access request aiming at other sub-stations comprises the session identifier is judged, if not, the synchronous request is sent to the main station through the synchronous system, and the session identifier is obtained;
and reading the session information in the cache according to the acquired session identifier.
In order to solve the above problem, the present application further discloses a multi-domain name session information sharing system, including:
the access request receiving module is used for receiving an access request sent by a client;
the judging module is used for judging whether the access request contains a session identifier for identifying session information, if so, the session identifier is obtained, if not, and if the access request target is a master station, the session identifier is generated and added into the access request, and if not, the access request target is a slave station, information is transmitted to the synchronizing module;
the synchronous module is used for sending a synchronous request to the main station, if the synchronous request can be obtained from the main station, the synchronous request is added into the access request, and if the synchronous request cannot be obtained from the main station, the synchronous request generates a session identifier and simultaneously adds the session identifier into domain names of the current substation and the main station;
and the reading module reads the session information in the cache according to the session identifier.
Further, the system further comprises:
and the proxy server is used for receiving the request for reading the session information in the cache, which is sent by the reading module, transmitting the request to the cache after analyzing the request, and returning the session information read from the cache to the reading module after analyzing the session information.
Compared with the prior art, the method has the following advantages:
the multi-domain name session information sharing method and system identify the session information in the one-time session process through the unique non-repeated session identifier generated when the session management system accesses for the first time in the one-time session process. When the subsequent access happens, the session identifier is synchronously acquired, so that the session information stored in the cache can be read, and the sharing of the session information among the multiple domain names is realized. Because of the generation of the session identifier, a large amount of session information is stored by the cache cluster without using cookies, and the security and stability risks, such as data loss and the like, caused by the limitation of the client browser on the use of the cookies are avoided.
In the sharing synchronization process, only the session identifier in the access request or the session identifier in the cookie needs to be read, and other information does not need to be acquired, so that the processes of transmitting a large number of cookies are reduced, the bandwidth is saved, and the cost is low. In the process, only when the independent domain name requests for the first time, the session identifier of the master station is synchronized once, and the session identifier is unique and unchangeable, and the session information is read through the session identifier every time, so that the change of the subsequent session information is completely and automatically synchronized for each domain name, the synchronization of a plurality of domain names is not required to be started after each modification, and the synchronization process is simple, high in efficiency and high in information safety.
Of course, it is not necessary for any product to achieve all of the above-described advantages at the same time for practicing the present application.
Drawings
FIG. 1 is a flowchart of a first embodiment of a method for sharing session information of multiple domain names according to the present application;
FIG. 2 is a flowchart of a second embodiment of a method for sharing multi-domain name session information according to the present application;
FIG. 3 is an implementation architecture diagram for multi-domain name session information sharing of the present application;
fig. 4 is a schematic structural diagram of a first embodiment of a multi-domain session information sharing system according to the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The sharing of the multi-domain name session information is realized by generating a session identifier for identifying the session information by a user in the first access in the process of one session (session, a state maintaining mechanism between a client browser and a server), reading the session identifier generated by the first access through a synchronization system when any website under a multi-domain name framework is subsequently accessed in the session process, and reading the session information in a cache according to the session identifier.
The specific multi-domain name session information sharing process is as follows: receiving an access request sent by a client; judging whether the access request contains a session identifier for identifying session information, and if so, acquiring the session identifier; if the access request is not contained and the target of the access request is the master station, generating a session identifier and adding the session identifier to the access request; if the access request is not contained and the target of the access request is a substation, sending a synchronization request to a main station through a synchronization system, and if a session identifier can be acquired, adding the session identifier to the target address of the access request; if not, generating a session identifier and respectively writing the session identifier into the domain names of the current substation and the main station recorded in the client cookie; and reading the session information in the cache according to the session identifier.
The following two cases are included for the foregoing process:
the first condition is as follows: the access request sent by the client is directed at the access of the master station under the multi-domain name architecture, if the access request contains the session identifier, the session identifier is obtained, and if the access request does not contain the session identifier, the session identifier is generated and added to the access request.
Case two: the access request sent by the client is directed at the access of the substation under the multi-domain name architecture, if the access request contains the session identifier, the session identifier is obtained, if the access request does not contain the session identifier, the session identifier is firstly obtained synchronously through the main station, and if the access request cannot be obtained synchronously, the session identifier is generated and then written into domain names of the substation and the main station.
These two cases will be described in detail below.
Referring to fig. 1, a first embodiment of a multi-domain name session information sharing method according to the present application is shown, including the following steps:
step 101, receiving an access request for a master station sent by a client.
The master station refers to one website selected from all websites under a multi-domain name architecture, and the master station can be selected at will or determined according to business needs, which is not limited in the present application. And other websites under the multi-domain name framework are sub-stations, and the sub-stations realize data sharing through interaction with the main station. Of course, if necessary, for example, the amount of data is particularly large, two or more websites may be selected as the master station in order to relieve the master station of stress.
Step 102, judging whether the access request aiming at the main station contains a session identifier for identifying the session information, if not, generating the session identifier and adding the session identifier into the current access request.
The session identifier is a random character string generated by the session management system to identify the session information, and the session identifiers generated under the multi-domain name architecture are unique character strings which are not repeated with other session identifiers, so that the session identifiers can be identified. In the application, the session identifier is stored in a fixed position of a request header as a part of an access request, and when the access request occurs, whether the session identifier is included can be judged by reading a corresponding position in the request header and judging whether a character string of the position is empty. In the same session, in the subsequent requests to the master station, the generated request header includes the session identifier, so that other substations or synchronization systems can acquire the session identifier from the master station conveniently.
The session information may include information such as the user name, login status, user level, user id, etc. of the current access request. If the session information is not included in the visit (e.g., by visiting a website with the guest), only the session identifier is recorded. If the access contains session information, the application further comprises: the session information is stored in a cache with the session identifier as an identification so that subsequent access requests during this session can share this session information. That is, the session identifier is generated at the first access, and in the course of a session, session information is generated at any subsequent time, and the session information is stored with the session identifier as an identifier, so as to implement session information sharing. The current session information is stored in the cache by directly sending a request to the cache. If the development languages and development environments of the cache and the main station are different, the data interaction between the main station and the cache can be realized by taking the proxy server as a relay.
And 103, receiving the access request of the access substation sent again by the client in the same session process.
The same session process refers to a process in which the session state of the client and the server is kept unchanged.
The access request for the substation sent again by the client can be provided by clicking a relevant link in the main station, or can be provided by directly inputting a website of the substation after a new window is created.
And 104, judging whether the access request aiming at the substation contains a session identifier, if not, sending a synchronization request to the main station through the synchronization system to acquire the session identifier.
Like the access request to the master station, the session identifier is read from the request header of the access request to the slave station, and if the session identifier is null, it indicates that the session identifier is not included in the access request. Since the session identifier has already been generated by the master prior to this access, the session identifier contained in the header of this request can be obtained simply by sending a synchronization request to the master via the synchronization system.
Wherein, sending a synchronization request to the master station through the synchronization system, and acquiring the session identifier comprises:
firstly, sending a preliminary request containing a URL (uniform resource locator) of a current access request target website to a synchronization system;
after receiving the preliminary request, the synchronization system takes the URL as a source address, carries the source address to send a synchronization request to the master station, reads a session identifier from a request head of the synchronization request sent to the master station, and adds the session identifier to the source address;
the synchronization system then re-initiates the access request to the source address of the write session identifier.
And 105, reading the session information in the cache according to the acquired session identifier.
Specifically, the method comprises the following steps: sending a read request containing the session identifier to a cache; inquiring session information which is stored and identified by the session identifier in a cache according to the session identifier; and if the corresponding session information exists, reading the session information, otherwise, not processing.
In some cases, because of differences in development languages and environments, the cache may not be able to identify the read request, and at this time, if the session information in the cache needs to be read, the request may also be parsed by the proxy server to be implemented, which specifically includes: sending a reading request which takes the session identifier as a request parameter to a proxy server, analyzing the reading request by the proxy server to obtain the session identifier, and inquiring and reading session information which takes the session identifier as a storage identifier in a cache according to the session identifier; and receiving the session information analyzed by the proxy server.
Referring to fig. 2, it shows a second embodiment of the multi-domain name session information sharing method of the present application, which includes the following steps:
step 201, receiving an access request for the substation sent by the client.
Step 202, determining whether the access request to the current substation contains a session identifier for identifying session information, if not, acquiring the session identifier to the master station through the synchronization system, and if the acquired session identifier is empty or cannot be acquired, generating the session identifier through the synchronization system.
As mentioned earlier, the inclusion or non-inclusion of a session identifier is achieved by reading a fixed location string as described earlier. If the session identifier does not exist, the session identifier is firstly acquired from the main station through the synchronization system, and if the session identifier does not exist, the fact that the access request aiming at the substation is the first access under the multi-domain name architecture in the session process is shown, the session identifier needs to be generated through the synchronization system. The synchronization system generates the session identifier in the same manner as the session management system of the master generates the session identifier.
And 203, adding the session identifier into the substation domain name and the main station domain name simultaneously in a cookie writing mode, and realizing the synchronization of the session identifiers of the current substation and the main station.
After the session identifier is generated, the synchronization system needs to request the domain names of the substation and the master station, and writes the session identifier into the domain names of the current substation and the current master station in a cookie writing manner, so that the synchronization of the session identifier is realized. When a subsequent request is sent to the primary site, the session identifier is automatically added to the subsequent request because the synchronization system has written the session identifier into the cookie and the request header serves as a carrier for the cookie.
And if the session information exists, storing the current session information into a cache by taking the session identifier as a storage identifier. Storing session information in the cache may be accomplished by sending requests directly to the cache. If the development language and development environment of the cache and the substation are different, data interaction can be realized through the proxy server.
Step 204, in the same session process, receiving the access request sent again by the client.
In step 205, if the access request to the master station is retransmitted, the session identifier in the access request is directly read, if the access request to another slave station is retransmitted, it is determined whether the access request to another slave station includes the session identifier, and if not, the synchronization request is transmitted to the master station via the synchronization system to acquire the session identifier.
In the case of an access request to the master, since synchronization has been performed before, the access request of the master includes the session identifier, and at this time, the session identifier may be directly read from a request header of the access request. If the access request to the other slave station includes the session identifier, the access request is directly read, and otherwise, the synchronization request is sent to the master station through the synchronization system to acquire the session identifier in the same manner as in the foregoing embodiment.
Step 206, reading the session information in the cache according to the acquired session identifier.
Referring to fig. 3, a specific architecture diagram of multi-domain session information sharing of the present application is shown, assuming that there are three websites under the multi-domain, where a is a master station (centersite), b, and c are substations. a and c can directly perform data interaction with a cache server (tairmemcachegroup) through a cache client (tairclient), b and the cache server realize data interaction through a proxy server (sessionProxy), wherein b and the proxy server realize data interaction through a hypertext transfer protocol (http), and the proxy server realizes data interaction through the cache client. The synchronization system (tbpass) is used to synchronize session identifiers (sessionkeys) of the three websites. The specific process of sharing the session information is as follows:
step one, a user accesses the master station www.a.com, the application of the station a uses a tbsession framework (session management framework), each time the tbsession framework is requested, whether the current request information has a session key is checked, if not, a unique non-repeated random character string is generated by the tbsession framework to be used as the session key, and the session key is used as the identification of the current session. After the sessionkey is generated, if the current user is a login user, the current sessionkey is used as a key identifier for information storage, and information such as the name, login state, user level and user id of the user who provides the current access is written into a memcachegroup through a tbsessionframe. When certain user information needs to be read in the next access request, the corresponding information can be inquired from the cache server through the cache client according to the sessionkey, and then the step five is carried out.
Step two, when the user accesses the application under www.c.com, the tbsession framework of the application of the station will check whether there is a sessionkey in the current access request, if there is no sessionkey, the tbsession framework actively initiates a request for the tbpass and carries the complete URL information of the source request of the current request, after the tbpass receives the request, the URL information of the current request is recorded as the request source, then the request source is carried, the synchronization request for the master station is initiated, because all the synchronization requests are analyzed to the synchronization system, the synchronization system can obtain the sessionkey of the master station through the request header of the synchronization request at this time, after obtaining the sessionkey of the master station, the tbpass writes the sessionkey into the request source, then re-initiates the request for the request source address, and go to step four. And if the master station sessionkey acquired by the tbpass is an empty character string, the master station sessionkey is considered to be empty, and the step five is entered.
And step three, when the user accesses the application under www.b.com, the process (the process of judging whether there is a sessionkey and requesting synchronization to the master station through tbpass) is the same as that in step two, if the sessionkey can be acquired, the step six to step eight is carried out, and if the master station sessionkey is empty, the step five to step eight is carried out.
And step four, the application queries the session information in the cache server through the cache client according to the session.
And step five, the tbpass calculates a unique nonrepeating character string as a sessionkey according to a specific algorithm, then the synchronization system respectively requests the domain name a.com of the main station and the domain name which needs to be synchronized currently, and writes the sessionkey into the domain name which needs to be synchronized currently and the main station in a cookie writing mode, so that the synchronization of the sessionkey is realized.
And step six, initiating an http request of sessionProxy by using sessionkey as a parameter of the request.
And step seven, the sessionProxy queries the cache server through the cache client according to the sessionkey and reads and writes the session information.
Step eight, sessionproxy returns the information inquired from the cache server to the application of domainB.
Referring to fig. 4, a multi-domain name session information sharing system of the present application is shown, which includes an access request receiving module 10, a judging module 20, a synchronizing module 30, and a reading module 40.
An access request receiving module 10, configured to receive an access request sent by a client. The access request receiving module 10 is disposed in each website server under the multi-domain name, and acquires information included in the access request after receiving the access request.
A determining module 20, configured to determine whether the access request includes a session identifier for identifying session information, if the access request includes the session identifier, obtain the session identifier, if the access request does not include the session identifier, and if the access request target is the master station, generate the session identifier and add the session identifier to the access request, and if the access request target is the slave station, transmit information to the synchronizing module. The determination module 20 is disposed in each web server under the multi-domain name, and reads the session identifier from the acquired request of the access request at a fixed position. The session identifier is a unique non-repetitive character string generated by the session management system to identify the primary session information, and if the character string can be read, the session identifier is included, and if the character string cannot be read or is empty, the session identifier is not included.
The synchronization module 30 sends a synchronization request to the master station, and if the session identifier can be obtained from the master station, the synchronization request is added to the access request, and if the session identifier cannot be obtained from the master station, the synchronization module generates the session identifier and adds the session identifier to the domain names of the current slave station and the master station. The synchronization module 30 performs data communication with both the master station and the slave station at the same time, and synchronizes session identifiers of the master station and the slave station.
And the reading module 40 reads the session information in the cache according to the session identifier. The reading module 40 is disposed in each website server under the multi-domain name, and performs data interaction with the cache to acquire the session information stored therein, thereby implementing session information sharing.
Preferably, the system further includes a proxy server, configured to receive the request for reading the session information in the cache, which is sent by the reading module, transmit the request to the cache after parsing, and return the session information read from the cache to the reading module after parsing.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The method and system for sharing multi-domain name session information provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
Claims (8)
1. A method for sharing multi-domain name session information is characterized by comprising the following steps:
receiving an access request sent by a client;
judging whether the access request contains a session identifier for identifying session information;
if yes, acquiring the session identifier;
if the access request is not contained and the target of the access request is the master station, generating a session identifier and adding the session identifier to the access request;
if the access request is not contained and the target of the access request is a substation, sending a synchronization request to a main station through a synchronization system, if a session identifier can be acquired, adding the session identifier to a target address of the access request, and if the session identifier cannot be acquired, generating the session identifier and writing the session identifier into domain names of the current substation and the main station recorded in a client cookie respectively; the sending of the synchronization request to the master station by the synchronization system comprises: sending a preliminary request to a synchronization system, wherein the preliminary request comprises a target URL of a current access request; the synchronization system takes a target URL in the preliminary request as a source address, carries the source address to send a synchronization request to the master station, reads a session identifier from a request head of the synchronization request sent to the master station, adds the session identifier to the source address, and then reinitiates an access request to the source address written with the session identifier;
and reading the session information in the cache according to the session identifier.
2. The method according to claim 1, wherein the reading the corresponding session information in the cache according to the obtained session identifier comprises:
sending a read request containing the session identifier to a cache;
inquiring session information which is stored and identified by the session identifier in a cache according to the session identifier;
and if the corresponding session information exists, reading the session information.
3. The method according to claim 1 or 2, wherein the reading the corresponding session information in the cache according to the obtained session identifier comprises:
sending a reading request which takes the session identifier as a request parameter to a proxy server, analyzing the reading request by the proxy server to obtain the session identifier, inquiring session information which takes the session identifier as a storage identifier in a cache according to the session identifier, and if corresponding session information exists, reading the session information by the proxy server;
and receiving the session information analyzed by the proxy server.
4. The multi-domain name session information sharing method of claim 3, wherein the read request sent to the proxy server is sent through a hypertext transfer protocol.
5. A multi-domain name session information sharing method is characterized by comprising the following steps:
receiving an access request aiming at a main station, which is sent by a client;
judging whether the access request aiming at the main station contains a session identifier for identifying session information, if not, generating the session identifier and adding the session identifier into the current access request;
in the same session process, receiving an access request of the access substation sent again by the client;
judging whether the access request aiming at the substation contains a session identifier, if not, sending a synchronization request to the main station through a synchronization system to acquire the session identifier; the sending of the synchronization request to the master station by the synchronization system comprises: sending a preliminary request to a synchronization system, wherein the preliminary request comprises a target URL of a current access request; the synchronization system takes a target URL in the preliminary request as a source address, carries the source address to send a synchronization request to the master station, reads a session identifier from a request head of the synchronization request sent to the master station, adds the session identifier to the source address, and then reinitiates an access request to the source address written with the session identifier;
and reading the session information in the cache according to the acquired session identifier.
6. A multi-domain name session information sharing method is characterized by comprising the following steps:
receiving an access request aiming at the substation sent by a client;
judging whether the access request aiming at the current substation contains a session identifier for identifying session information, if not, acquiring the session identifier from the main station through the synchronization system, and if the acquired session identifier is empty or cannot be acquired, generating the session identifier through the synchronization system;
the session identifier is added to the substation domain name and the main station domain name simultaneously in a way of writing in a client cookie, so that the synchronization of the session identifier of the current substation and the main station is realized;
in the same session process, receiving an access request sent again by the client;
if the access request aiming at the main station is sent again, the session identifier is read, if the access request aiming at other sub-stations is sent again, whether the access request aiming at other sub-stations comprises the session identifier is judged, if not, the synchronous request is sent to the main station through the synchronous system, and the session identifier is obtained; the sending of the synchronization request to the master station by the synchronization system comprises: sending a preliminary request to a synchronization system, wherein the preliminary request comprises a target URL of a current access request; the synchronization system takes a target URL in the preliminary request as a source address, carries the source address to send a synchronization request to the master station, reads a session identifier from a request head of the synchronization request sent to the master station, adds the session identifier to the source address, and then reinitiates an access request to the source address written with the session identifier;
and reading the session information in the cache according to the acquired session identifier.
7. A multi-domain name session information sharing system, comprising:
the access request receiving module is used for receiving an access request sent by a client;
the judging module is used for judging whether the access request contains a session identifier for identifying session information, if so, the session identifier is obtained, if not, and if the access request target is a master station, the session identifier is generated and added into the access request, and if not, the access request target is a slave station, information is transmitted to the synchronizing module;
the synchronous module is used for sending a synchronous request to the main station, if the synchronous request can be obtained from the main station, the synchronous request is added into the access request, and if the synchronous request cannot be obtained from the main station, the synchronous request generates a session identifier and simultaneously adds the session identifier into domain names of the current substation and the main station; the sending of the synchronization request to the master station comprises: sending a preliminary request to a synchronization system, wherein the preliminary request comprises a target URL of a current access request; the synchronization system takes a target URL in the preliminary request as a source address, carries the source address to send a synchronization request to the master station, reads a session identifier from a request head of the synchronization request sent to the master station, adds the session identifier to the source address, and then reinitiates an access request to the source address written with the session identifier;
and the reading module reads the session information in the cache according to the session identifier.
8. The multi-domain name session information sharing system as claimed in claim 7, wherein said system further comprises:
and the proxy server is used for receiving the request for reading the session information in the cache, which is sent by the reading module, transmitting the request to the cache after analyzing the request, and returning the session information read from the cache to the reading module after analyzing the session information.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110346777.XA CN103095859B (en) | 2011-11-04 | 2011-11-04 | Multiple domain name session information shares method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
HK1180478A1 HK1180478A1 (en) | 2013-10-18 |
HK1180478B true HK1180478B (en) | 2016-09-30 |
Family
ID=
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103095859B (en) | Multiple domain name session information shares method and system | |
EP3229148B1 (en) | Website access method and device, and website system | |
EP4191955A1 (en) | Method and device for securely accessing intranet application | |
CN110049022B (en) | Domain name access control method and device and computer readable storage medium | |
US10356153B2 (en) | Transferring session data between network applications accessible via different DNS domains | |
KR102363784B1 (en) | How to share data between applications and web browsers | |
CN103795767B (en) | Synchronization method and system for cross-application session information | |
CN106169963B (en) | The access method and system of service page, proxy server | |
US20150113015A1 (en) | Method and Apparatus for Acquiring Resource | |
EP3136656A1 (en) | Information sharing method and device | |
CN104618449A (en) | Web singe-point login implementing method and device | |
CN105635064B (en) | CSRF attack detection method and device | |
JP2011257810A (en) | Relay server device, cookie control method and cookie control program | |
JP5347429B2 (en) | Uniform resource locator rewriting method and apparatus | |
US20110154457A1 (en) | Authenticating method, conversion device, and relay device | |
CN114218540A (en) | Project access method and device | |
CN111651747A (en) | Login bill synchronization system and method and related equipment | |
US20090234858A1 (en) | Use Of A Single Service Application Instance For Multiple Data Center Subscribers | |
JP5495188B2 (en) | Web service providing system, server device, method and program | |
US20140172985A1 (en) | Method and system for forming a hierarchically complete, absent of query syntax elements, valid Uniform Resource Locator (URL) link consisting of a domain name followed by server resource path segment containing syntactically complete e-mail address | |
CA2848175A1 (en) | Methods for optimizing a web content proxy server and devices thereof | |
US9866614B2 (en) | Methods for website version control using bucket cookies | |
CN111092958B (en) | A node access method, device, system and storage medium | |
CN106959975B (en) | Transcoding resource cache processing method, device and equipment | |
CN104519109A (en) | Method and device for sharing file among multiple devices |