A remote logout method and system based on third-party authentication
Patent Information
- Application Number
- CN202111533176.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-15
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-12-15
AI Technical Summary
[0002]到目前为止,在互联网应用领域出现了各种登录方法或方式,如简单的用户名密码登录、短信验证码登录、OAuth认证登录等,但是尚未出现专门用于远程控制退出登录的产品,特别是基于第三方认证的可集成不同应用系统的远程退出登录产品
[0003] In view of the above technical problems in related technologies, the present invention proposes a remote logout method and system based on third-party authentication, which can overcome the above shortcomings of the existing technology. The first object of the present invention is to provide a remote logout method based on third-party authentication; the second purpose of the present invention is to provide a remote logout system based on third-party authentication.
Smart Images

Figure CN114357430B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of information technology application and relates to a remote logout method and system based on third-party authentication. Background Art
[0002] So far, various login methods or ways have emerged in the field of Internet applications, such as simple username and password login, SMS verification code login, OAuth authentication login, etc., but there has not yet been a product specifically used for remote control logout, especially a remote logout product based on third-party authentication that can integrate different application systems. The traditional logout method is to manually click logout or automatically timeout on the application system. If it is based on the client saving credentials, if the server does not perform timeout invalidation processing, the client will always be logged in, causing security risks. According to the traditional logout method, as long as the user leaves the client without manually logging out in time, there will be security risks, and other illegal personnel may use the client to continue illegal operations. If the remote control terminal is only bound to a certain or fixed application system, it is impossible to perform remote logout operations on other application systems that are not bound to the control terminal, and the overall effect is relatively limited. Summary of the invention
[0003] In view of the above technical problems in the related art, the present invention proposes a remote logout method and system based on third-party authentication, which can overcome the shortcomings of the above-mentioned prior art. The first object of the present invention is to provide a remote logout method based on third-party authentication; the second object of the present invention is to provide a remote logout system based on third-party authentication.
[0004] To achieve the above object, the remote logout method based on third-party authentication of the present invention comprises the following steps:
[0005] Step S1: Add the application system ID to the third-party authentication platform database, and add the callback address and callback key data of the corresponding application system;
[0006] Step S2: The remote client or mobile office device installs the remote logout program of the third-party authentication platform, and registers to generate a user ID and a corresponding client key of the third-party authentication platform, becoming a remote client of the third-party authentication platform, and the user ID and the corresponding client key are added to the database of the third-party authentication platform;
[0007] Step S3: The third-party authentication platform remote client selects the application system to be logged out, and the program automatically generates encrypted token data including the client key, application system ID, user ID / user name, and timestamp;
[0008] Step S4: sending the token data to a third-party authentication platform via data transmission;
[0009] Step S5: The third-party authentication platform determines the legitimacy of the user ID of the received token data. If the user ID is a valid user ID, it is considered to be legal. According to the application system ID, the callback address of the application server is retrieved from the database of the third-party authentication platform.
[0010] Step S6: The third-party authentication platform generates encrypted token data including the callback key, application system ID, user ID / user name, and timestamp, and transmits the encrypted token data to the callback address interface of the server where the application system is located via data transmission;
[0011] Step S7: The server callback interface judges the legitimacy of the received token data. If it is legal, the application system logout interface is called to execute the logout operation instruction to log out the session or invalidate the login identification.
[0012] In addition, the remote logout method based on third-party authentication according to the above embodiment of the present invention may also have the following additional technical features:
[0013] According to one embodiment of the present invention, the third-party authentication platform remote client saves the client key, application system id, and user id / user name.
[0014] According to an embodiment of the present invention, in step S1, the application system id, callback address and callback key are pre-stored in the third-party authentication platform database in a one-to-one correspondence; the application system corresponds to the application system id one-to-one.
[0015] According to an embodiment of the present invention, in step S1, the third-party authentication platform database can modify, delete, and save the application system id, callback address, and callback key.
[0016] According to an embodiment of the present invention, encryption is performed using md5 or sha1 in step S3.
[0017] According to an embodiment of the present invention, in step S5, the legitimacy of the user ID is judged. If it is illegal, the execution of the logout instruction is stopped and an error message is returned.
[0018] According to an embodiment of the present invention, in step S7, the server callback interface performs a validity check on the received token data. If the received token data is not valid, the callback interface stops executing and returns an error message.
[0019] According to an embodiment of the present invention, the data transmission mode is socket or http.
[0020] According to an embodiment of the present invention, a user can perform the remote logout method based on third-party authentication on multiple application systems belonging to the user.
[0021] The remote logout system based on third-party authentication according to an embodiment of the present invention includes:
[0022] A client remote control module, which registers the third-party platform client user ID and can search according to the application ID or application name to find the application system that needs to be managed;
[0023] A logout instruction sending module, wherein the logout instruction sending module triggers the logout instruction communication module when the user clicks the logout button;
[0024] The logout instruction communication module sends the logout instruction to the logout instruction forwarding module through socket, or submits it to the application system interface of the logout instruction forwarding module through http;
[0025] An exit instruction forwarding module receives instruction data submitted by the exit instruction communication module, verifies the legitimacy of the user, and triggers the data control module if the user is legitimate;
[0026] Data control module, the data control module searches the database for the corresponding callback address and callback key according to the application id in the acquired parameters, and transmits these data to the instruction forwarding communication module. The application system id is the id generated by the third-party authentication platform and saved to the third-party authentication platform database after the application system developer applies for a development account and adds the application. The callback address and callback key corresponding to the application system id are provided by the developer and saved to the third-party authentication platform database;
[0027] An instruction forwarding communication module, wherein the instruction forwarding communication module sends the instruction to the exit instruction processing module via socket or http;
[0028] The exit instruction execution module is used to receive the instruction data submitted by the instruction forwarding communication module, verify the legitimacy of the forwarded data, and process the user's logout related operations, such as logging off the user's session or invalidating the user's corresponding login identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 Schematic diagram of the remote logout system based on third-party authentication. DETAILED DESCRIPTION
[0031] The following will be combined with the appended Figure 1 , the technical solution of the present invention is described clearly and completely. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of the present invention;
[0032] To use the present invention, an application system administrator needs to register a developer account on the third-party authentication platform described in the present invention, create an application system id, and add the callback address and callback key data of the server where the application system corresponding to the corresponding application system id is located. The callback address is called when the background program of the third-party authentication platform forwards the logout instruction data, and the logout instruction data is submitted to the background of the application system to execute the logout operation.
[0033] Users can install the third-party authentication platform remote client developed by the third-party authentication platform on mobile office devices and desktop computers, and register as the third-party authentication platform user id and the corresponding client key, and save the registration information in the database of the third-party authentication platform. Users can search the application system name or application system id on the remote client to add the application system icon. If a user logs in to an application system on a PC and forgets to log out when leaving, the account is still logged in in the standby state, and there is a risk of others directly damaging the system or stealing data. When the user has left the company after get off work and found that he forgot to log out of the system, it is obviously troublesome to log out of the system when returning to the company, so he opens the pre-installed third-party platform remote logout client application on his mobile phone or computer, clicks the corresponding icon of the client application, and a logout button pops up, and clicks the logout button. If the user is a legitimate user and the third-party authentication platform forwards the logout request successfully, it will prompt a successful logout, otherwise it will prompt a logout failure; the application system to be logged in has been registered on the third-party authentication platform and obtained relevant parameters, and has been connected with the third-party authentication platform through relevant interfaces, including the interface for the third-party authentication platform to forward the logout request and the callback interface for the application system to receive the forwarded request and perform logout processing. The callback address and callback key data of the application system correspond one-to-one with the application system ID. The user can pre-set multiple application systems in the client application and can remotely log out of multiple logged-in application systems.
[0034] According to the embodiment of the present invention, the remote logout system based on third-party authentication includes a client remote control module, a logout instruction sending module, a logout instruction communication module, a data control module, a logout instruction forwarding module, an instruction forwarding communication module, and a logout instruction execution module; the client remote control module registers the third-party platform client user ID and provides a use environment for issuing logout instructions; the logout instruction sending module issues a logout instruction, issues a client key, an application system ID, a user ID / user name, and a timestamp for encryption, and generates token instruction data; the logout instruction communication module transmits the instruction data to the data control module via socket or http; the data control module stores the application system ID, user ID data The system receives instruction data from the exit instruction communication module, verifies the legitimacy of the user ID of the instruction data, and when it is judged to be legal, retrieves the corresponding callback address and callback key data from the database according to the application system ID; when it is judged to be illegal, refuses to forward the logout instruction; the exit instruction forwarding module retrieves the callback address and prepares to forward the instruction data; the instruction forwarding communication module forwards the instruction data to the specified application server interface according to the callback address; the exit instruction execution module determines the legitimacy of the forwarded instruction data, and when it is legal, calls the application system logout interface, executes the logout operation instruction, cancels the session or invalidates the login identification, and completes the logout processing; when it is judged that the forwarded instruction data is illegal, refuses to forward the logout instruction.
[0035] The present invention is not limited to the above-mentioned optimal implementation mode. Anyone can derive other various forms of products under the inspiration of the present invention. However, no matter what changes are made in the method, all technical solutions that are the same or similar to those of the present application fall within the protection scope of the present invention.
Claims
1. A remote logout method based on third-party authentication, characterized in that: The following steps are involved: Step S1: Add the application system ID to the third-party authentication platform database, and add the callback address and callback key data of the corresponding application system; Create an application system id, and add the callback address and callback key data of the server where the application system is located corresponding to the application system id. The callback address is called when the backend program of the third-party authentication platform forwards the logout instruction data, and the logout instruction data is submitted to the backend of the application system to execute the logout operation. The third-party authentication platform database pre-stores the application system id, callback address and callback key in a one-to-one correspondence; the application system corresponds to the application system id one-to-one; the third-party authentication platform database modifies, deletes and saves the application system id, callback address and callback key; Step S2: Install the remote logout program of the third-party authentication platform on the remote client or mobile office device, register and generate the user ID and the corresponding client key of the third-party authentication platform, become the remote client of the third-party authentication platform, and add the user ID and the corresponding client key to the database of the third-party authentication platform; Step S3: The third-party authentication platform remote client selects an application system, and the remote client program generates encrypted token data including the client key, application system ID, user ID / user name, and timestamp; Step S4: sending the token data to the third-party authentication platform via data transmission; Step S5: The third-party authentication platform determines the legitimacy of the user ID of the received token data. If the user ID is a valid user ID, it is considered to be legal. According to the application system ID, the callback address of the application server is retrieved from the database of the third-party authentication platform. Step S6: The third-party authentication platform generates token data including the callback key, application system ID, user ID / user name, and timestamp for encryption and transmits it to the server callback interface where the application system is located through data transmission; Step S7: the server callback interface judges the legitimacy of the received token data. If it is legitimate, the application system logout interface is called to execute the logout operation instruction to log out the session or invalidate the login identification; The user performs the remote logout method based on third-party authentication on multiple application systems belonging to the user.
2. A remote logout method based on third-party authentication according to claim 1, characterized in that: The third-party authentication platform remote client saves the client key, application system id, and user id / user name.
3. A remote logout method based on third-party authentication according to claim 1, characterized in that: In step S3, encryption is performed using md5 or sha1.
4. A remote logout method based on third-party authentication according to claim 1, characterized in that: In step S5, the legitimacy of the user ID is judged, and if it is illegal, the execution of the logout instruction is stopped and an error message is returned.
5. A remote logout method based on third-party authentication according to claim 1, characterized in that: In step S7, the server callback interface judges the legitimacy of the received token data. If it is illegal, the callback interface stops executing and returns an error message.
6. A remote logout method based on third-party authentication according to claim 1, characterized in that: The data transmission method is socket or http.
7. The system used by the remote logout method based on third-party authentication according to any one of claims 1 to 6, characterized in that: include: A client remote control module, which registers the remote client user ID of the third-party authentication platform and searches according to the application ID or application name to find the application system that needs to be managed; A logout instruction sending module, wherein the logout instruction sending module triggers the logout instruction communication module when the user clicks the logout button; The logout instruction communication module sends the logout instruction to the logout instruction forwarding module through socket, or submits it to the application system interface of the logout instruction forwarding module through http; An exit instruction forwarding module receives instruction data submitted by the exit instruction communication module, verifies the legitimacy of the user, and triggers the data control module if the user is legitimate; A data control module, wherein the data control module searches the database for the corresponding callback address and callback key data according to the application id in the acquired parameters, and transmits these data to the instruction forwarding communication module, wherein the application system id is an id generated by the third-party authentication platform and saved to the third-party authentication platform database after the application system developer applies for a development account and adds an application, and the callback address and callback key corresponding to the application system id are provided by the developer and saved to the third-party authentication platform database; An instruction forwarding communication module, wherein the instruction forwarding communication module sends the instruction to the exit instruction processing module via socket or http; The exit instruction execution module is used to receive the instruction data submitted by the instruction forwarding communication module, verify the legitimacy of the forwarded data, and process the user's logout related operations, such as logging off the user's session or invalidating the user's corresponding login identification.
