CN114329387A - Single sign-on control method, system, electronic device and computer-readable medium - Google Patents
Single sign-on control method, system, electronic device and computer-readable medium Download PDFInfo
- Publication number
- CN114329387A CN114329387A CN202111640238.7A CN202111640238A CN114329387A CN 114329387 A CN114329387 A CN 114329387A CN 202111640238 A CN202111640238 A CN 202111640238A CN 114329387 A CN114329387 A CN 114329387A
- Authority
- CN
- China
- Prior art keywords
- user
- login
- verification
- request
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
Description
技术领域technical field
本发明涉及大数据数据访问技术领域,尤其涉及一种单点登录控制方法、系统、电子设备及计算机可读介质。The present invention relates to the technical field of big data data access, and in particular, to a single sign-on control method, system, electronic device and computer-readable medium.
背景技术Background technique
B/S结构(Browser/Server,浏览器/服务器模式)是WEB兴起后的一种网络结构模式,拥有成本低、维护方便、分布性强、开发简单,不用安装任何专门的软件就能实现在任何地方进行操作,客户端零维护,系统扩展容易,只要有一台可以上网的电脑就能使用等优点。B/S structure (Browser/Server, browser/server model) is a network structure model after the rise of WEB. It has low cost of ownership, convenient maintenance, strong distribution, and simple development. It can be realized in the network without installing any special software. It can be operated anywhere, the client has zero maintenance, the system is easy to expand, and it can be used as long as there is a computer with Internet access.
随着B/S系统的普及,越来越多的企业建立了自己的B/S系统,且企业在不同发展阶段、不同业务要求可能会建立多个业务系统,而这些业务系统往往各自为政,登录地址复杂多样,用户信息各不相通,用户在使用过程中需要记住纷繁复杂的网址信息以及用户信息,严重制约了用户的办公效率。With the popularization of B/S systems, more and more enterprises have established their own B/S systems, and enterprises may establish multiple business systems at different development stages and with different business requirements, and these business systems are often independent. The addresses are complex and diverse, and the user information is different. The user needs to remember the complicated website information and user information in the process of using, which seriously restricts the user's office efficiency.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供一种单点登录控制方法、系统、电子设备及计算机可读介质,该方法使用统一的登录入口响应用户的登录请求,并查找该用户具有访问权限的业务系统,以供用户选择目标系统,后续通过两次握手的方式访问目标系统,使得用户只需记住登录页面这一个网址信息和用户信息,就能安全高效访问多个业务系统,提高办公效率。In view of this, embodiments of the present invention provide a single sign-on control method, system, electronic device, and computer-readable medium. The method uses a unified login portal to respond to a user's login request, and searches for a business system to which the user has access rights , so that the user can choose the target system, and then access the target system through two handshakes, so that the user only needs to remember the login page and user information, and can access multiple business systems safely and efficiently, improving office efficiency.
为实现上述目的,根据本发明实施例的一个方面,提供了一种单点登录控制方法。To achieve the above object, according to an aspect of the embodiments of the present invention, a single sign-on control method is provided.
本发明实施例的一种单点登录控制方法,包括:通过登录页面接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端;A single sign-on control method according to an embodiment of the present invention includes: receiving a login request from a client through a login page, generating corresponding user login information according to the login request, searching for a business system to which the user has access rights, returning the business system to the client;
响应于所述用户对所述业务系统中目标系统的选择,根据所述登录请求和所述目标系统的链接地址,生成跳转请求并发送至所述目标系统,以使所述目标系统根据所述跳转请求,生成反向验证请求;In response to the user's selection of the target system in the business system, according to the login request and the link address of the target system, a jump request is generated and sent to the target system, so that the target system can be The above jump request is generated, and a reverse verification request is generated;
接收来自所述目标系统的反向验证请求,校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果并发送至所述目标系统,以使所述目标系统确定校验成功,允许所述用户访问。Receive the reverse verification request from the target system, verify whether the verification information of the reverse verification request is consistent with the user login information, obtain the verification result and send it to the target system, so that the target system It is determined that the verification is successful, and the user is allowed to access.
可选地,所述根据所述登录请求和所述目标系统的链接地址,生成跳转请求,包括:Optionally, generating a jump request according to the login request and the link address of the target system includes:
从所述登录请求中提取指定的目标字段,将所述目标字段与用户登录时的登录时间戳进行拼接,得到参数串;Extract the specified target field from the login request, and splicing the target field with the login timestamp when the user logs in to obtain a parameter string;
对所述参数串进行加密和编码,得到编码结果,将所述编码结果作为参数添加到所述目标系统的链接地址,得到跳转请求。Encrypt and encode the parameter string to obtain an encoding result, and add the encoding result as a parameter to the link address of the target system to obtain a jump request.
可选地,所述目标字段包括用户标识;Optionally, the target field includes a user ID;
所述反向验证请求通过以下方式生成:The reverse verification request is generated in the following ways:
对所述跳转请求的参数进行转码和解密;Transcoding and decrypting the parameters of the jump request;
将解密后得到的用户标识和登录时间戳进行拼接,以生成所述反向验证请求。The decrypted user ID and the login timestamp are spliced to generate the reverse verification request.
可选地,所述生成相应的用户登录信息的步骤之后,所述方法还包括:Optionally, after the step of generating corresponding user login information, the method further includes:
将所述用户登录信息保存至数据库;其中,所述用户登录信息包括所述用户标识和所述登录时间戳;saving the user login information to a database; wherein the user login information includes the user ID and the login timestamp;
所述校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果,包括:The verification information of the reverse verification request is consistent with the user login information, and the verification result is obtained, including:
根据所述反向验证请求的用户标识,从所述数据库中查询相同用户标识的登录时间戳;According to the user ID of the reverse verification request, query the login timestamp of the same user ID from the database;
将查询得到的登录时间戳与解密得到的登录时间戳比较,如果查询得到的登录时间戳与解密得到的登录时间戳一致,则校验成功;否则,校验失败;Compare the login timestamp obtained by the query with the login timestamp obtained by decryption. If the login timestamp obtained by the query is consistent with the login timestamp obtained by decryption, the verification is successful; otherwise, the verification fails;
所述得到校验结果的步骤之后,所述方法还包括:将所述数据库中所述用户标识对应的登录时间戳删除。After the step of obtaining the verification result, the method further includes: deleting the login timestamp corresponding to the user ID in the database.
可选地,所述得到校验结果的步骤之后,所述方法还包括:Optionally, after the step of obtaining the verification result, the method further includes:
确定所述校验结果指示校验成功,获取为所述用户配置的用户权限信息;Determine that the verification result indicates that the verification is successful, and obtain the user permission information configured for the user;
将所述用户权限信息发送至所述目标系统,以使所述目标系统根据所述用户权限信息进行页面展示。Sending the user authority information to the target system, so that the target system displays a page according to the user authority information.
可选地,所述获取为所述用户配置的用户权限信息的步骤之前,所述方法还包括:Optionally, before the step of acquiring the user permission information configured for the user, the method further includes:
接收为所述用户配置的用户权限信息,建立所述用户的用户基本信息和所述用户权限信息之间的关联关系;其中,所述用户权限信息是根据用户部门、用户级别、用户类型和权限位图中的一个或者多个配置的,所述权限位图用于定义所述用户的菜单权限。Receive the user authority information configured for the user, and establish an association relationship between the user's basic user information and the user authority information; wherein the user authority information is based on the user department, user level, user type and authority One or more configurations in the bitmap, the permission bitmap is used to define the menu permission of the user.
可选地,所述通过登录页面接收来自客户端的登录请求的步骤之前,所述方法还包括:Optionally, before the step of receiving the login request from the client through the login page, the method further includes:
接收来自所述客户端的验证码获取请求,将所述验证码获取请求转发至短信系统,以使所述短信系统向所述客户端发送验证码;receiving a verification code acquisition request from the client, and forwarding the verification code acquisition request to a short message system, so that the short message system sends a verification code to the client;
接收所述短信系统反馈的验证码发送状态,将所述验证码发送状态发送至所述客户端,以使所述用户在填写所述验证码后,提交所述登录请求。Receive the verification code sending status fed back by the short message system, and send the verification code sending status to the client, so that the user submits the login request after filling in the verification code.
为实现上述目的,根据本发明实施例的另一方面,提供了一种单点登录控制系统。To achieve the above object, according to another aspect of the embodiments of the present invention, a single sign-on control system is provided.
本发明实施例的一种单点登录控制系统,包括:查找模块,用于通过登录页面接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端;A single sign-on control system according to an embodiment of the present invention includes: a search module, configured to receive a log-in request from a client through a log-in page, generate corresponding user log-in information according to the log-in request, and search for a user who has access rights. a business system, returning the business system to the client;
生成模块,用于响应于所述用户对所述业务系统中目标系统的选择,根据所述登录请求和所述目标系统的链接地址,生成跳转请求并发送至所述目标系统,以使所述目标系统根据所述跳转请求,生成反向验证请求;The generating module is configured to, in response to the user's selection of the target system in the business system, generate a jump request according to the login request and the link address of the target system and send it to the target system, so that all The target system generates a reverse verification request according to the jump request;
校验模块,用于接收来自所述目标系统的反向验证请求,校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果并发送至所述目标系统,以使所述目标系统确定校验成功,允许所述用户访问。A verification module, configured to receive a reverse verification request from the target system, verify whether the verification information of the reverse verification request is consistent with the user login information, obtain a verification result and send it to the target system, In order for the target system to determine that the verification is successful, the user is allowed to access.
可选地,所述生成模块,还用于Optionally, the generating module is also used for
从所述登录请求中提取指定的目标字段,将所述目标字段与用户登录时的登录时间戳进行拼接,得到参数串;以及Extract the specified target field from the login request, and splicing the target field with the login timestamp when the user logs in to obtain a parameter string; and
对所述参数串进行加密和编码,得到编码结果,将所述编码结果作为参数添加到所述目标系统的链接地址,得到跳转请求。Encrypt and encode the parameter string to obtain an encoding result, and add the encoding result as a parameter to the link address of the target system to obtain a jump request.
可选地,所述目标字段包括用户标识;Optionally, the target field includes a user ID;
所述反向验证请求通过以下方式生成:The reverse verification request is generated in the following ways:
对所述跳转请求的参数进行转码和解密;Transcoding and decrypting the parameters of the jump request;
将解密后得到的用户标识和登录时间戳进行拼接,以生成所述反向验证请求。The decrypted user ID and the login timestamp are spliced to generate the reverse verification request.
可选地,所述系统还包括:Optionally, the system further includes:
保存模块,用于将所述用户登录信息保存至数据库;其中,所述用户登录信息包括所述用户标识和所述登录时间戳;a saving module, configured to save the user login information to a database; wherein the user login information includes the user ID and the login timestamp;
删除模块,用于在得到所述校验结果后,将所述数据库中所述用户标识对应的登录时间戳删除;a deletion module, configured to delete the login timestamp corresponding to the user ID in the database after obtaining the verification result;
所述校验模块,还用于根据所述反向验证请求的用户标识,从所述数据库中查询相同用户标识的登录时间戳;以及The verification module is further configured to query the login timestamp of the same user ID from the database according to the user ID of the reverse verification request; and
将查询得到的登录时间戳与解密得到的登录时间戳比较,如果查询得到的登录时间戳与解密得到的登录时间戳一致,则校验成功;否则,校验失败。Compare the login timestamp obtained by the query with the login timestamp obtained by decryption. If the login timestamp obtained by the query is consistent with the login timestamp obtained by the decryption, the verification succeeds; otherwise, the verification fails.
可选地,所述系统还包括:Optionally, the system further includes:
权限获取模块,用于确定所述校验结果指示校验成功,获取为所述用户配置的用户权限信息;以及an authority acquisition module, configured to determine that the verification result indicates that the verification is successful, and acquire user authority information configured for the user; and
将所述用户权限信息发送至所述目标系统,以使所述目标系统根据所述用户权限信息进行页面展示。Sending the user authority information to the target system, so that the target system displays a page according to the user authority information.
可选地,所述系统还包括:Optionally, the system further includes:
建立模块,用于接收为所述用户配置的用户权限信息,建立所述用户的用户基本信息和所述用户权限信息之间的关联关系;其中,所述用户权限信息是根据用户部门、用户级别、用户类型和权限位图中的一个或者多个配置的,所述权限位图用于定义所述用户的菜单权限。Establishing module, configured to receive the user authority information configured for the user, and establish an association relationship between the basic user information of the user and the user authority information; wherein, the user authority information is based on the user department, user level , user type and one or more configurations in the permission bitmap, where the permission bitmap is used to define the menu permission of the user.
可选地,所述系统还包括:Optionally, the system further includes:
验证码获取模块,用于接收来自所述客户端的验证码获取请求,将所述验证码获取请求转发至短信系统,以使所述短信系统向所述客户端发送验证码;以及a verification code acquisition module, configured to receive a verification code acquisition request from the client, and forward the verification code acquisition request to a short message system, so that the short message system sends a verification code to the client; and
接收所述短信系统反馈的验证码发送状态,将所述验证码发送状态发送至所述客户端,以使所述用户在填写所述验证码后,提交所述登录请求。Receive the verification code sending status fed back by the short message system, and send the verification code sending status to the client, so that the user submits the login request after filling in the verification code.
为实现上述目的,根据本发明实施例的又一方面,提供了一种电子设备。To achieve the above object, according to yet another aspect of the embodiments of the present invention, an electronic device is provided.
本发明实施例的一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种单点登录控制方法。An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, The one or more processors are caused to implement a single sign-on control method according to an embodiment of the present invention.
为实现上述目的,根据本发明实施例的再一方面,提供了一种计算机可读介质。To achieve the above object, according to yet another aspect of the embodiments of the present invention, a computer-readable medium is provided.
本发明实施例的一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种单点登录控制方法。A computer-readable medium according to an embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, a single sign-on control method according to an embodiment of the present invention is implemented.
为实现上述目的,根据本发明实施例的又一方面,提供了一种计算机程序产品。To achieve the above object, according to yet another aspect of the embodiments of the present invention, a computer program product is provided.
本发明实施例的一种计算机程序产品,包括计算机程序,所述程序被处理器执行时实现本发明实施例的一种单点登录控制方法。A computer program product according to an embodiment of the present invention includes a computer program, which implements a single sign-on control method according to an embodiment of the present invention when the program is executed by a processor.
上述发明中的一个实施例具有如下优点或有益效果:使用统一的登录入口响应用户的登录请求,并查找该用户具有访问权限的业务系统,以供用户选择目标系统,后续通过两次握手的方式访问目标系统,使得用户只需记住登录页面这一个网址信息和用户信息,就能安全高效访问多个业务系统,提高办公效率。通过对跳转至目标系统的链接地址进行加密,防止了敏感信息泄露和恶意篡改。An embodiment of the above invention has the following advantages or beneficial effects: using a unified login portal to respond to a user's login request, and searching for a business system that the user has access rights to, so that the user can select a target system, and then use a two-way handshake method. Accessing the target system enables users to safely and efficiently access multiple business systems by simply remembering the login page and user information, thereby improving office efficiency. By encrypting the link address that jumps to the target system, sensitive information leakage and malicious tampering are prevented.
通过对收到的跳转请求进行转码和解密,得到解密的用户标识和登录时间戳,便于后续进行解密验证。将解密得到的登录时间戳与同一用户登录时保存的登录时间戳进行对比,实现反向验证,保证登录信息的正确性;同时在对比之后,清空保存的登录时间戳,保证跳转链接仅能使用一次。By transcoding and decrypting the received jump request, the decrypted user ID and login timestamp are obtained, which is convenient for subsequent decryption and verification. Compare the login timestamp obtained by decryption with the login timestamp saved when the same user logs in to realize reverse verification to ensure the correctness of the login information; at the same time, after the comparison, clear the saved login timestamp to ensure that the jump link can only be used. Use once.
基于配置的用户权限信息向用户展示页面,使得用户仅能看到并操作自己有权限的页面内容。支持多种权限控制策略,且可以细化到菜单级权限的权限控制,满足业务系统的权限控制需求。以动态验证码的方式请求登录,进一步保证了登录安全,避免暴力破解登录。Based on the configured user permission information, the page is displayed to the user, so that the user can only see and operate the page content to which they have permission. It supports a variety of permission control strategies, and can be refined to the permission control of menu-level permissions to meet the permission control requirements of business systems. Requesting login in the form of dynamic verification code further ensures login security and avoids brute force login.
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。Further effects of the above non-conventional alternatives will be described below in conjunction with specific embodiments.
附图说明Description of drawings
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used for better understanding of the present invention and do not constitute an improper limitation of the present invention. in:
图1是本发明实施例的单点登录控制方法的主要步骤的示意图;1 is a schematic diagram of main steps of a single sign-on control method according to an embodiment of the present invention;
图2是本发明实施例的单点登录控制方法的主要流程的示意图;2 is a schematic diagram of a main flow of a single sign-on control method according to an embodiment of the present invention;
图3是本发明实施例的用户管理实体示意图;3 is a schematic diagram of a user management entity according to an embodiment of the present invention;
图4是本发明实施例的使用用户标识和密码进行登录认证的时序图;Fig. 4 is the sequence diagram of the embodiment of the present invention that uses user ID and password to perform login authentication;
图5是本发明实施例的使用手机号和验证码进行登录认证的时序图;5 is a sequence diagram of using a mobile phone number and a verification code to perform login authentication according to an embodiment of the present invention;
图6是本发明实施例的第一次握手认证的时序图;6 is a sequence diagram of the first handshake authentication according to an embodiment of the present invention;
图7是本发明实施例的第二次握手认证的时序图;7 is a sequence diagram of a second handshake authentication according to an embodiment of the present invention;
图8是本发明实施例的单点登录控制系统的主要模块的示意图;8 is a schematic diagram of main modules of a single sign-on control system according to an embodiment of the present invention;
图9是本发明实施例可以应用于其中的示例性系统架构图;FIG. 9 is an exemplary system architecture diagram to which an embodiment of the present invention may be applied;
图10是适于用来实现本发明实施例的电子设备的计算机系统的结构示意图。FIG. 10 is a schematic structural diagram of a computer system suitable for implementing an electronic device according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
本申请技术方案中对数据的获取、存储、使用、处理等均符合国家法律法规的相关规定。The acquisition, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of national laws and regulations.
下面对本发明实施例涉及的术语进行解释。The terms involved in the embodiments of the present invention are explained below.
B/S架构:即浏览器和服务器架构模式建立的应用系统。B/S architecture: that is, the application system established by the browser and server architecture mode.
SMS:英文全称为Short Message Service,意为短信息服务,是一种存储和转发服务。SMS: The full English name is Short Message Service, which means short message service, which is a store and forward service.
URL:英文全称为Uniform Resource Locator,意为统一资源定位符。URL: The full English name is Uniform Resource Locator, which means Uniform Resource Locator.
IP:即Internet Protocol,是网络之间互连的协议。IP: Internet Protocol, is the protocol for interconnection between networks.
单点登录:英文全称为Single Sign On,简称为SSO,定义是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统。Single sign-on: English full name is Single Sign On, abbreviated as SSO, which is defined as in multiple application systems, users only need to log in once to access all mutually trusted application systems.
图1是本发明实施例的单点登录控制方法的主要步骤的示意图。如图1所示,本发明实施例的单点登录控制方法,由单点登录控制系统实现,主要包括如下步骤:FIG. 1 is a schematic diagram of main steps of a single sign-on control method according to an embodiment of the present invention. As shown in FIG. 1 , the single sign-on control method according to the embodiment of the present invention is implemented by a single sign-on control system, and mainly includes the following steps:
步骤S101:通过登录页面接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端。用户使用客户端打开登录页面,以向单点登录控制系统发送登录请求。该登录请求可以包括用户标识和密码,也可以是用户标识和验证码。用户标识可以是用户名、手机号等唯一标识。Step S101: Receive a login request from a client through a login page, generate corresponding user login information according to the login request, search for a business system to which the user has access rights, and return the business system to the client. The user opens the login page using the client to send a login request to the single sign-on control system. The login request may include a user ID and password, or may be a user ID and a verification code. The user ID can be a unique ID such as a user name and a mobile phone number.
单点登录控制系统对登录请求进行验证,验证通过后,允许用户登录,并基于登录请求,生成相应的用户登录信息。该用户登录信息可以包括用户标识、登录时间戳,还可以包括客户端地址、服务端地址(即单点登录控制系统的服务器的IP地址)。单点登录控制系统还基于用户标识,查找用户具有访问权限的业务系统,将这些业务系统返回至客户端,以供用户选择其想要登录的系统作为目标系统。The single sign-on control system verifies the login request. After the verification is passed, the user is allowed to log in, and based on the login request, the corresponding user login information is generated. The user login information may include a user ID, a login timestamp, and may also include a client address and a server address (ie, the IP address of the server of the single sign-on control system). The single sign-on control system also searches for business systems to which the user has access rights based on the user ID, and returns these business systems to the client, so that the user can select the system he wants to log in to as the target system.
步骤S102:响应于所述用户对所述业务系统中目标系统的选择,根据所述登录请求和所述目标系统的链接地址,生成跳转请求并发送至所述目标系统,以使所述目标系统根据所述跳转请求,生成反向验证请求。用户成功登录单点登录控制系统后,通过系统选择页面选择进入目标系统。单点登录控制系统基于登录请求和目标系统的链接地址,生成跳转请求,用以请求跳转至目标系统。目标系统接收跳转请求,获取请求信息,返回跳转成功信息。至此完成第一次握手认证。Step S102: In response to the user's selection of the target system in the business system, according to the login request and the link address of the target system, generate a jump request and send it to the target system, so that the target The system generates a reverse verification request according to the jump request. After the user successfully logs in to the single sign-on control system, he or she selects to enter the target system through the system selection page. The single sign-on control system generates a jump request based on the login request and the link address of the target system to request jumping to the target system. The target system receives the jump request, obtains the request information, and returns the jump success information. This completes the first handshake authentication.
在一优选的实施例中,单点登录控制系统对目标系统的链接地址(URL)进行加密后,再向目标系统发送跳转请求,用于防止敏感信息泄露和恶意篡改。具体地,可以先从登录请求中提取指定的目标字段,将目标字段与登录时间戳进行拼接,得到参数串;之后对参数串进行加密和编码,得到编码结果,将编码结果作为参数添加到目标系统的链接地址,即可得到跳转请求。In a preferred embodiment, the single sign-on control system encrypts the link address (URL) of the target system, and then sends a jump request to the target system to prevent leakage of sensitive information and malicious tampering. Specifically, the specified target field can be extracted from the login request first, and the target field and the login timestamp can be spliced to obtain a parameter string; then the parameter string is encrypted and encoded to obtain the encoding result, and the encoding result is added as a parameter to the target The link address of the system, you can get the jump request.
步骤S103:接收来自所述目标系统的反向验证请求,校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果并发送至所述目标系统,以使所述目标系统确定校验成功,允许所述用户访问。目标系统向单点登录控制系统发送反向验证请求,用于验证用户标识和登录时间戳的合法性。该反向验证请求包括用户标识和登录时间戳。Step S103: Receive the reverse verification request from the target system, verify whether the verification information of the reverse verification request is consistent with the user login information, obtain the verification result and send it to the target system, so that all The target system determines that the verification is successful and allows the user to access. The target system sends a reverse verification request to the single sign-on control system to verify the legitimacy of the user ID and login timestamp. The reverse authentication request includes the user ID and the login timestamp.
单点登录控制系统接收到反向验证请求后,校验目标系统发送的用户标识和登录时间戳与用户登录信息中的用户标识和登录时间戳是否一致,并向目标系统反馈校验结果。目标系统基于校验结果,确定校验成功的情况下,与用户的客户端建立会话,允许用户访问;确定校验失败的情况下,返回拒绝页面。至此完成第二次握手认证。After receiving the reverse verification request, the single sign-on control system verifies whether the user ID and login timestamp sent by the target system are consistent with the user ID and login timestamp in the user login information, and feeds back the verification result to the target system. Based on the verification result, the target system establishes a session with the user's client if the verification is successful, and allows the user to access; if the verification fails, returns a rejection page. This completes the second handshake authentication.
本实施例在保证业务系统原有功能的情况下,建立了一个单点登录控制系统,用户可以以统一的登录地址、唯一的用户信息,安全高效的访问多个业务系统,解决了企业内部多业务系统、多登录方式带来的种种问题,提高了办公效率;同时通过两次握手保证了登录用户的信息安全。This embodiment establishes a single sign-on control system under the condition of ensuring the original functions of the business system. Users can access multiple business systems safely and efficiently with a unified login address and unique user information. Various problems caused by the business system and multiple login methods have improved office efficiency; at the same time, the information security of logged-in users is ensured through two handshakes.
图2是本发明实施例的单点登录控制方法的主要流程的示意图。FIG. 2 is a schematic diagram of a main flow of a single sign-on control method according to an embodiment of the present invention.
如图2所示,本发明实施例的单点登录控制方法,主要包括如下步骤:As shown in FIG. 2 , the single sign-on control method according to the embodiment of the present invention mainly includes the following steps:
步骤S201:接收配置的用户基本信息和用户权限信息,以构建用户管理体系。建立多层次的用户管理体系,包括用户基本信息、用户权限信息,以及用户基本信息和用户权限信息之间的关联关系。Step S201: Receive the configured basic user information and user authority information to construct a user management system. Establish a multi-level user management system, including basic user information, user authority information, and the relationship between user basic information and user authority information.
其中,用户基本信息用于保存唯一用户的基础特征信息,可以包括用户标识、机构编号、登录密码、联系方式等,用户标识是登录系统的唯一用户号;机构编号是用户所属机构,用于为不同机构用提供不同权限;登录密码,加密存储,用于用户登录验证;联系方式用于提供手机号验证码的登录方式。Among them, the basic user information is used to save the basic feature information of the unique user, which may include user ID, organization number, login password, contact information, etc. The user ID is the unique user ID for logging in to the system; the organization ID is the organization to which the user belongs and is used for Different institutions provide different permissions; the login password, encrypted and stored, is used for user login verification; the contact information is used to provide the login method of the mobile phone number verification code.
用户权限信息用于保存适用于不同系统权限控制方式的权限信息,可用于提供用户级别、用户部门、用户类型等控制权限,还可以通过权限位图细化控制每个用户具体的菜单权限。实施例中,用户权限信息可以根据用户部门、用户级别、用户类型和权限位图中的一个或者多个配置。比如,用户权限信息包括用户标识、渠道编号、部门编号、用户级别、用户类型和权限位图。User permission information is used to save permission information applicable to different system permission control methods. It can be used to provide control permissions such as user level, user department, and user type. It can also control the specific menu permissions of each user through permission bitmaps. In an embodiment, the user permission information may be configured according to one or more of the user department, user level, user type and permission bitmap. For example, user authority information includes user ID, channel ID, department ID, user level, user type, and permission bitmap.
其中,渠道编号是业务系统的唯一编号;部门编号用于区分不同部门用户权限;用户级别用于区分不同级别用户权限;用户类型为业务系统提供不同的用户类型,从而区分不同的用户权限;权限位图用于定义该用户的具体菜单功能权限,权限位图内容可有以下类型:0、无权限;1、查询权限;2、维护权限;3、复核权限等。Among them, the channel number is the unique number of the business system; the department number is used to distinguish the user rights of different departments; the user level is used to distinguish the user rights of different levels; the user type provides different user types for the business system to distinguish different user rights; The bitmap is used to define the specific menu function authority of the user. The content of the authority bitmap can be of the following types: 0, no authority; 1, query authority; 2, maintenance authority; 3, review authority, etc.
图3是本发明实施例的用户管理实体示意图。如图3所示,用户基本信息包括用户名称、机构编号、登录密码、手机号、用户状态等,用户权限信息包括用户级别、用户类型、权限位图等。用户基本信息与用户权限信息之间通过主键(PK)关联。FIG. 3 is a schematic diagram of a user management entity according to an embodiment of the present invention. As shown in FIG. 3 , the basic user information includes user name, organization number, login password, mobile phone number, user status, etc., and user permission information includes user level, user type, permission bitmap, and the like. A primary key (PK) is used to associate user basic information with user authority information.
步骤S202:用户使用客户端向单点登录控制系统发送登录请求,通过单点登录控制系统进行统一的登录认证。登录认证的方式可以是用户标识和密码,也可以是用户绑定的手机号和验证码。Step S202: The user sends a login request to the single sign-on control system by using the client, and performs unified login authentication through the single sign-on control system. The login authentication method can be the user ID and password, or the mobile phone number and verification code bound to the user.
实施例中,设用户为UserA,单点登录控制系统为Channel System,假设企业员工UserA需要访问目标系统System A,则可以通过Channel System进行统一登录认证。下面结合图4和图5对上述两种登录认证方式分别进行说明。In the embodiment, it is assumed that the user is UserA, and the single sign-on control system is Channel System. Assuming that the enterprise employee UserA needs to access the target system System A, unified login authentication can be performed through the Channel System. The above two login authentication methods are described below with reference to FIG. 4 and FIG. 5 .
图4是本发明实施例的使用用户标识和密码进行登录认证的时序图。如图4所示,用户使用用户标识和密码进行登录认证的实现流程为:FIG. 4 is a sequence diagram of performing login authentication using a user ID and a password according to an embodiment of the present invention. As shown in Figure 4, the implementation process of the user using the user ID and password for login authentication is as follows:
步骤S401:UserA通过客户端打开统一登录页面,输入用户标识和密码登录Channel System。Step S401: UserA opens the unified login page through the client, and enters the user ID and password to log in to the Channel System.
步骤S402:Channel System验证UserA提交的用户标识与密码的正确性,验证成功后,允许UserA登录,生成用户登录信息并保存至数据库,加载相应的用户权限信息,确定UserA具有哪些业务系统的访问权限,也即图3中“渠道编号”的权限。用户登录信息包括:用户标识、登录时间戳、客户端地址和服务端地址。Step S402: The Channel System verifies the correctness of the user ID and password submitted by UserA, and after the verification is successful, allows UserA to log in, generates user login information and saves it to the database, loads the corresponding user authority information, and determines which business systems UserA has access authority to , that is, the authority of the "channel number" in Figure 3. User login information includes: user ID, login timestamp, client address and server address.
步骤S403:Channel System通过系统选择页面向UserA展示其具有访问权限的业务系统。假设这些业务系统中包括System A,则展示内容包括System A的入口。Step S403: Channel System displays to UserA the business systems that it has access rights to through the system selection page. Assuming that these business systems include System A, the display content includes the entry of System A.
图5是本发明实施例的使用手机号和验证码进行登录认证的时序图。如图5所示,用户使用绑定的手机号和验证码进行登录认证的实现流程为:FIG. 5 is a sequence diagram of login authentication using a mobile phone number and a verification code according to an embodiment of the present invention. As shown in Figure 5, the implementation process for the user to use the bound mobile phone number and verification code for login authentication is as follows:
步骤S501:UserA通过客户端打开统一登录页面,输入自身绑定的手机号,向Channel System发送验证码获取请求。Step S501: UserA opens the unified login page through the client, inputs the mobile phone number bound to itself, and sends a verification code acquisition request to the Channel System.
步骤S502:Channel System接收到来自UserA的验证码获取请求后,将验证码获取请求转发至System SMS(短信系统)。Step S502: After receiving the verification code acquisition request from UserA, the Channel System forwards the verification code acquisition request to System SMS (Short Message System).
步骤S503:System SMS向UserA的绑定手机号发送验证码。Step S503: System SMS sends a verification code to the bound mobile phone number of UserA.
步骤S504:System SMS反馈验证码发送状态给Channel System。Step S504: The System SMS feeds back the verification code sending status to the Channel System.
步骤S505:Channel System接收到验证码发送状态后,将验证码发送状态发送至UserA。实施例中,Channel System通过页面的形式向UserA展现验证码发送状态。Step S505: After receiving the verification code sending status, the Channel System sends the verification code sending status to UserA. In the embodiment, the Channel System displays the verification code sending status to UserA in the form of a page.
步骤S506:UserA接收到验证码后,填写验证码,提交登录请求。Step S506: After receiving the verification code, UserA fills in the verification code and submits a login request.
步骤S507:Channel System收到验证码后,发送给System SMS判断验证码的正确性。Step S507: After receiving the verification code, the Channel System sends it to the System SMS to judge the correctness of the verification code.
步骤S508:System SMS将验证码的验证结果返回至Channel System。Step S508: The System SMS returns the verification result of the verification code to the Channel System.
步骤S509:Channel System接收到验证结果后,确定验证成功,允许UserA登录,生成用户登录信息并保存至数据库,加载相应的用户权限信息,确定UserA具有哪些业务系统的访问权限,也即图3中“渠道编号”的权限。Step S509: After receiving the verification result, the Channel System determines that the verification is successful, allows UserA to log in, generates user login information and saves it to the database, loads the corresponding user authority information, and determines which business system access authority UserA has, that is, in FIG. 3 . "Channel ID" permission.
步骤S510:Channel System通过系统选择页面向UserA展示其具有访问权限的业务系统。假设这些业务系统中包括System A,则展示内容包括System A的入口。Step S510: The Channel System displays to UserA the business systems that it has access rights to through the system selection page. Assuming that these business systems include System A, the display content includes the entry of System A.
步骤S203:登录认证通过后,用户登录单点登录控制系统,通过系统选择页面选择有权限访问的目标系统,进行第一次握手认证。UserA成功登录Channel System后,基于Channel System返回的系统选择页面,从其具有访问权限的业务系统中选择目标系统System A,之后进行第一次握手认证。Step S203: After the login authentication is passed, the user logs in to the single sign-on control system, selects a target system that has access rights through the system selection page, and performs the first handshake authentication. After UserA successfully logs in to the Channel System, based on the system selection page returned by the Channel System, he selects the target system System A from the business systems he has access rights to, and then performs the first handshake authentication.
图6是本发明实施例的第一次握手认证的时序图。如图6所示,本发明实施例的第一次握手认证的实现流程为:FIG. 6 is a sequence diagram of the first handshake authentication according to an embodiment of the present invention. As shown in FIG. 6 , the implementation process of the first handshake authentication in the embodiment of the present invention is as follows:
步骤S601:UserA通过系统选择页面选择进入System A。Step S601: UserA selects to enter System A through the system selection page.
步骤S602:Channel System加密System A的URL入口,得到跳转请求,将跳转请求发送至System A。具体地,从登录请求中提取指定的目标字段,将目标字段与用户登录时的登录时间戳进行拼接,得到参数串;之后对参数串进行加密和编码,得到编码结果,将编码结果作为参数添加到目标系统的链接地址,得到跳转请求。Step S602: The Channel System encrypts the URL entry of System A, obtains a jump request, and sends the jump request to System A. Specifically, the specified target field is extracted from the login request, and the target field is spliced with the login timestamp when the user logs in to obtain a parameter string; then the parameter string is encrypted and encoded to obtain an encoding result, and the encoding result is added as a parameter The link address to the target system to get the jump request.
实施例中,目标字段为用户标识(USERID)、渠道编号(CHNAl_NO)、服务端地址(IP)和端口(PORT)。将登录时间戳用TIMESTAMP表示,则可使用连接符,比如“&”拼接目标字段和登录时间戳,得到参数串。此时,参数串如下:In the embodiment, the target fields are user ID (USERID), channel number (CHNA1_NO), server address (IP) and port (PORT). If the login timestamp is represented by TIMESTAMP, you can use a connector, such as "&", to concatenate the target field and the login timestamp to obtain a parameter string. At this point, the parameter string is as follows:
USERID=001&TIMESTAMP=20131108142213301&CHNAL_NO=15&IP=XXX.XXX.XXX.XXX&PORT=7001USERID=001&TIMESTAMP=20131108142213301&CHNAL_NO=15&IP=XXX.XXX.XXX.XXX&PORT=7001
使用加密算法对上述参数串加密,加密算法可以任选,比如为:Use an encryption algorithm to encrypt the above parameter string. The encryption algorithm can be optional, for example:
urlDisturb ud=new urlDisturb();urlDisturb ud=new urlDisturb();
String strEncode=new String(ud.encode(参数串.getBytes()));String strEncode=new String(ud.encode(parameter string.getBytes()));
经加密后,还可以对加密串编码,防止加密串中的特殊字符被浏览器转码后无法解密。实施例中,使用URLEncoder编码方式编码:After encryption, the encrypted string can also be encoded to prevent special characters in the encrypted string from being decrypted after being transcoded by the browser. In the embodiment, use URLEncoder encoding method to encode:
strURLEncode=URLEncoder.encode(strEncode)strURLEncode=URLEncoder.encode(strEncode)
最终得到的跳转请求可以为:The final jump request can be:
http://System A IP:PORT/System A_WEB/loginAction.do?PARAM=strURLEncodehttp://System A IP:PORT/System A_WEB/loginAction.do? PARAM=strURLEncode
步骤S603:System A接收到跳转请求后,解密跳转请求,获取请求信息。按照加密、编码的逆过程,对跳转请求的参数(PARAM)进行转码和解密。以使用URLEncoder编码为例,需使用URLDecoder方式转码:Step S603: After receiving the jump request, System A decrypts the jump request and obtains the request information. According to the reverse process of encryption and encoding, the parameter (PARAM) of the jump request is transcoded and decrypted. Take URLEncoder encoding as an example, you need to use URLDecoder to transcode:
strURLDecode=URLDecoder.decode(strURLEncode)strURLDecode=URLDecoder.decode(strURLEncode)
之后使用相应的解密算法对转码结果进行解密,解密算法比如为:Then use the corresponding decryption algorithm to decrypt the transcoding result, for example, the decryption algorithm is:
urlDisturb ud=new urlDisturb();urlDisturb ud=new urlDisturb();
String deUrl=new String(ud.decode(strURLDecode.getBytes()));String deUrl=new String(ud.decode(strURLDecode.getBytes()));
步骤S604:System A向Channel System反馈跳转成功的响应信息。Step S604: System A feeds back response information of successful jumping to the Channel System.
步骤S204:目标系统回调获取用户管理体系的用户权限信息,进行第二次握手认证。System A接收到跳转请求后,再次向Channel System发起反向验证,验证用户登录信息的合法性,并获取用户权限信息。Step S204: The target system calls back to obtain the user authority information of the user management system, and performs the second handshake authentication. After receiving the jump request, System A initiates reverse verification to the Channel System again to verify the legitimacy of the user's login information and obtain user permission information.
图7是本发明实施例的第二次握手认证的时序图。如图7所示,本发明实施例的第二次握手认证的实现流程为:FIG. 7 is a sequence diagram of a second handshake authentication according to an embodiment of the present invention. As shown in FIG. 7 , the implementation process of the second handshake authentication according to the embodiment of the present invention is as follows:
步骤S701:System A向Channel System发起反向验证请求,用以验证USERID和TIMESTAMP的合法性。System A将解密所得的用户标识、登录时间戳(还可以包括渠道编号)拼接为反向验证请求,根据服务端地址,反向调用Channel System。Step S701: System A initiates a reverse verification request to Channel System to verify the legitimacy of USERID and TIMESTAMP. System A splices the decrypted user ID and login timestamp (which may also include the channel number) into a reverse verification request, and reversely calls the Channel System according to the server address.
实施例中,反向验证请求的请求格式可以为:http://Channel System_ip:port/svcManager/UserSingleLoginServlet?xml=xml格式报文In the embodiment, the request format of the reverse authentication request may be: http://Channel System_ip:port/svcManager/UserSingleLoginServlet? xml=xml format message
步骤S702:Channel System验证从System A发送的用户标识、登录时间戳与数据库中保存的用户登录信息是否一致。由图4和图5可知,用户点击Channel System跳转至System A时,已经将用户登录信息保存到了数据库。Step S702: The Channel System verifies whether the user ID and login timestamp sent from System A are consistent with the user login information stored in the database. It can be seen from Figure 4 and Figure 5 that when the user clicks Channel System to jump to System A, the user login information has been saved to the database.
Channel System根据反向验证请求的用户标识,从数据库中查询相同用户标识的登录时间戳;之后将查询得到的登录时间戳与System A返回的解密得到的登录时间戳比较,如果查询得到的登录时间戳与解密得到的登录时间戳一致,则校验成功;否则,校验失败。Channel System queries the login timestamp of the same user ID from the database according to the user ID of the reverse verification request; then compares the login timestamp obtained by the query with the decryption timestamp returned by System A. If the stamp is consistent with the login timestamp obtained by decryption, the verification succeeds; otherwise, the verification fails.
步骤S703:Channel System返回验证结果至System A,并在确认验证成功的情况下,同时返回用户权限信息。如果校验成功,则获取为UserA配置的用户权限信息,将该用户权限信息发送至System A。如果校验失败,则返回错误报文至System A。之后将数据库中该用户标识对应的登录时间戳删除,以保证跳转链接只能使用一次。Step S703: The Channel System returns the verification result to System A, and returns the user permission information when the verification is successful. If the verification is successful, obtain the user permission information configured for UserA, and send the user permission information to System A. If the verification fails, an error message is returned to System A. Then delete the login timestamp corresponding to the user ID in the database to ensure that the jump link can only be used once.
步骤S704:System A接收到验证结果后,如果验证结果指示验证成功,则与UserA建立会话,并根据用户权限信息展现相关功能;如果验证结果指示验证失败,则返回拒绝页面。Step S704: After the System A receives the verification result, if the verification result indicates that the verification is successful, it establishes a session with UserA, and displays relevant functions according to the user permission information; if the verification result indicates that the verification fails, it returns a rejection page.
从以上描述可以看出,本实施例建立了一个单点登录控制系统,该系统使用统一的登录入口,建立了统一的用户管理体系,用户只需要记住单点登录控制系统的用户密码即可,不用记忆多套业务系统的用户密码,严重降低了用户的负担;同时支持多种权限控制策略,支持区分机构、机构层级、部门、用户类型,也可以细化到菜单级权限控制,能够适配大部分业务系统的权限控制需求;同时通过两次握手和加密编码,保证了登录用户的信息安全。It can be seen from the above description that a single sign-on control system is established in this embodiment. The system uses a unified login entry to establish a unified user management system, and the user only needs to remember the user password of the single sign-on control system. , there is no need to memorize the user passwords of multiple sets of business systems, which seriously reduces the user's burden; at the same time, it supports a variety of permission control strategies, supports the distinction between organizations, organization levels, departments, and user types, and can also be refined to menu-level permission control, which can be adapted to the needs of users. Compatible with the permission control requirements of most business systems; at the same time, through two handshakes and encryption coding, the information security of logged-in users is guaranteed.
图8是本发明实施例的单点登录控制系统的主要模块的示意图。如图8所示,本发明实施例的单点登录控制系统800,主要包括:FIG. 8 is a schematic diagram of main modules of a single sign-on control system according to an embodiment of the present invention. As shown in FIG. 8 , the single sign-on
查找模块801,用于通过登录页面接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端。用户使用客户端打开登录页面,以向单点登录控制系统发送登录请求。该登录请求可以包括用户标识和密码,也可以是用户标识和验证码。用户标识可以是用户名、手机号等唯一标识。A
单点登录控制系统对登录请求进行验证,验证通过后,允许用户登录,并基于登录请求,生成相应的用户登录信息。该用户登录信息可以包括用户标识、登录时间戳,还可以包括客户端地址、服务端地址。单点登录控制系统还基于用户标识,查找用户具有访问权限的业务系统,将这些业务系统返回至客户端,以供用户选择其想要登录的系统作为目标系统。The single sign-on control system verifies the login request. After the verification is passed, the user is allowed to log in, and based on the login request, the corresponding user login information is generated. The user login information may include a user ID, a login timestamp, and may also include a client address and a server address. The single sign-on control system also searches for business systems to which the user has access rights based on the user ID, and returns these business systems to the client, so that the user can select the system he wants to log in to as the target system.
生成模块802,用于响应于所述用户对所述业务系统中目标系统的选择,根据所述登录请求和所述目标系统的链接地址,生成跳转请求并发送至所述目标系统,以使所述目标系统根据所述跳转请求,生成反向验证请求。The
用户成功登录单点登录控制系统后,通过系统选择页面选择进入目标系统。单点登录控制系统基于登录请求和目标系统的链接地址,生成跳转请求,用以请求跳转至目标系统。目标系统接收跳转请求,获取请求信息,返回跳转成功信息。至此完成第一次握手认证。After the user successfully logs in to the single sign-on control system, he or she selects to enter the target system through the system selection page. The single sign-on control system generates a jump request based on the login request and the link address of the target system to request jumping to the target system. The target system receives the jump request, obtains the request information, and returns the jump success information. This completes the first handshake authentication.
校验模块803,用于接收来自所述目标系统的反向验证请求,校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果并发送至所述目标系统,以使所述目标系统确定校验成功,允许所述用户访问。目标系统向单点登录控制系统发送反向验证请求,用于验证用户标识和登录时间戳的合法性。该反向验证请求包括用户标识和登录时间戳。A
单点登录控制系统接收到反向验证请求后,校验目标系统发送的用户标识和登录时间戳与用户登录信息中的用户标识和登录时间戳是否一致,并向目标系统反馈校验结果。目标系统基于校验结果,确定校验成功的情况下,与用户的客户端建立会话,允许用户访问;确定校验失败的情况下,返回拒绝页面。至此完成第二次握手认证。After receiving the reverse verification request, the single sign-on control system verifies whether the user ID and login timestamp sent by the target system are consistent with the user ID and login timestamp in the user login information, and feeds back the verification result to the target system. Based on the verification result, the target system establishes a session with the user's client if the verification is successful, and allows the user to access; if the verification fails, returns a rejection page. This completes the second handshake authentication.
另外,本发明实施例的单点登录控制系统800还可以包括:保存模块、删除模块、权限获取模块、建立模块和验证码获取模块(图8中未示出)。其中,保存模块,用于将所述用户登录信息保存至数据库;其中,所述用户登录信息包括所述用户标识和所述登录时间戳。删除模块,用于在得到所述校验结果后,将所述数据库中所述用户标识对应的登录时间戳删除。In addition, the single sign-on
权限获取模块,用于确定所述校验结果指示校验成功,获取为所述用户配置的用户权限信息;以及将所述用户权限信息发送至所述目标系统,以使所述目标系统根据所述用户权限信息进行页面展示。an authority acquisition module, configured to determine that the verification result indicates that verification is successful, and acquire user authority information configured for the user; and send the user authority information to the target system, so that the target system can The above user permission information is displayed on the page.
建立模块,用于接收为所述用户配置的用户权限信息,建立所述用户的用户基本信息和所述用户权限信息之间的关联关系;其中,所述用户权限信息是根据用户部门、用户级别、用户类型和权限位图中的一个或者多个配置的,所述权限位图用于定义所述用户的菜单权限。Establishing module, configured to receive the user authority information configured for the user, and establish an association relationship between the basic user information of the user and the user authority information; wherein, the user authority information is based on the user department, user level , user type and one or more configurations in the permission bitmap, where the permission bitmap is used to define the menu permission of the user.
验证码获取模块,用于接收来自所述客户端的验证码获取请求,将所述验证码获取请求转发至短信系统,以使所述短信系统向所述客户端发送验证码;以及接收所述短信系统反馈的验证码发送状态,将所述验证码发送状态发送至所述客户端,以使所述用户在填写所述验证码后,提交所述登录请求。A verification code acquisition module, configured to receive a verification code acquisition request from the client, forward the verification code acquisition request to a short message system, so that the short message system sends a verification code to the client; and receive the short message The verification code sending status returned by the system is sent to the client, so that the user submits the login request after filling in the verification code.
从以上描述可以看出,使用统一的登录入口响应用户的登录请求,并查找该用户具有访问权限的业务系统,以供用户选择目标系统,后续通过两次握手的方式访问目标系统,使得用户只需记住一个网址信息和用户信息,就能安全高效访问多个业务系统,提高办公效率。通过对跳转至目标系统的链接地址进行加密,防止了敏感信息泄露和恶意篡改。It can be seen from the above description that a unified login entry is used to respond to the user's login request, and to find the business system that the user has access rights to, so that the user can select the target system, and then access the target system through two handshakes, so that the user only has access to the target system. You need to remember a website information and user information, you can access multiple business systems safely and efficiently, and improve office efficiency. By encrypting the link address that jumps to the target system, sensitive information leakage and malicious tampering are prevented.
图9示出了可以应用本发明实施例的单点登录控制方法或单点登录控制系统的示例性系统架构900。FIG. 9 shows an
如图9所示,系统架构900可以包括终端设备901、902、903,网络904和服务器905。网络904用以在终端设备901、902、903和服务器905之间提供通信链路的介质。用户可以使用终端设备901、902、903通过网络904与服务器905交互,以接收或发送消息等。As shown in FIG. 9 , the
服务器905可以是提供各种服务的服务器,例如对用户利用终端设备901、902、903所发送的登录请求提供支持的后台管理服务器。后台管理服务器可以对生成用户登录信息,返回用户有权限的业务系统,生成跳转请求,校验信息是否一致等处理,并将处理结果(例如校验结果)反馈给终端设备。The
需要说明的是,本发明实施例所提供的单点登录控制方法一般由服务器905执行,相应地,单点登录控制系统一般设置于服务器905中。It should be noted that the single sign-on control method provided by the embodiment of the present invention is generally executed by the
应该理解,图9中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 9 are only illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
根据本发明的实施例,本发明还提供了一种电子设备、一种计算机可读介质和一种计算机程序产品。According to embodiments of the present invention, the present invention also provides an electronic device, a computer-readable medium, and a computer program product.
本发明的电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现本发明实施例的一种单点登录控制方法。The electronic device of the present invention comprises: one or more processors; storage means for storing one or more programs, when the one or more programs are executed by the one or more processors, so that the one or more programs A plurality of processors implement a single sign-on control method according to an embodiment of the present invention.
本发明的计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现本发明实施例的一种单点登录控制方法。The computer-readable medium of the present invention stores a computer program thereon, and when the program is executed by a processor, a single sign-on control method according to an embodiment of the present invention is implemented.
本发明的计算机程序产品,包括计算机程序,所述程序被处理器执行时实现本发明实施例的一种单点登录控制方法。The computer program product of the present invention includes a computer program, which implements a single sign-on control method according to an embodiment of the present invention when the program is executed by a processor.
下面参考图10,其示出了适于用来实现本发明实施例的电子设备的计算机系统1000的结构示意图。图10示出的终端设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring next to FIG. 10 , it shows a schematic structural diagram of a
如图10所示,计算机系统1000包括中央处理单元(CPU)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储部分1008加载到随机访问存储器(RAM)1003中的程序而执行各种适当的动作和处理。在RAM 1003中,还存储有系统1000操作所需的各种程序和数据。CPU 1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。As shown in FIG. 10, a
以下部件连接至I/O接口1005:包括键盘、鼠标等的输入部分1006;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1007;包括硬盘等的存储部分1008;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1009。通信部分1009经由诸如因特网的网络执行通信处理。驱动器1010也根据需要连接至I/O接口1005。可拆卸介质1011,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1010上,以便于从其上读出的计算机程序根据需要被安装入存储部分1008。The following components are connected to the I/O interface 1005: an
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1009从网络上被下载和安装,和/或从可拆卸介质1011被安装。在该计算机程序被中央处理单元(CPU)1001执行时,执行本发明的系统中限定的上述功能。In particular, the processes described above with reference to the flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the present invention. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括查找模块、生成模块和校验模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,查找模块还可以被描述为“接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端的模块”。The modules involved in the embodiments of the present invention may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules can also be set in the processor, for example, it can be described as: a processor includes a search module, a generation module and a verification module. Among them, the names of these modules do not constitute a limitation of the module itself under certain circumstances. For example, the search module can also be described as "receiving a login request from a client, and generating corresponding user login information according to the login request. , and find the business system that the user has access rights to, and return the business system to the client's module".
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:接收来自客户端的登录请求,根据所述登录请求,生成相应的用户登录信息,并查找用户具有访问权限的业务系统,将所述业务系统返回至所述客户端;响应于所述用户对所述业务系统中目标系统的选择,根据所述登录请求和所述目标系统的链接地址,生成跳转请求并发送至所述目标系统,以使所述目标系统根据所述跳转请求,生成反向验证请求;接收来自所述目标系统的反向验证请求,校验所述反向验证请求的验证信息与所述用户登录信息是否一致,得到校验结果并发送至所述目标系统,以使所述目标系统确定校验成功,允许所述用户访问。As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: receiving a login request from a client, and generating a corresponding user login request according to the login request information, and look up the business system to which the user has access rights, and return the business system to the client; in response to the user's selection of the target system in the business system, according to the login request and the target system link address, generate a jump request and send it to the target system, so that the target system can generate a reverse verification request according to the jump request; receive a reverse verification request from the target system, verify all Whether the verification information of the reverse verification request is consistent with the user login information, the verification result is obtained and sent to the target system, so that the target system determines that the verification is successful and allows the user to access.
根据本发明实施例的技术方案,使用统一的登录入口响应用户的登录请求,并查找该用户具有访问权限的业务系统,以供用户选择目标系统,后续通过两次握手的方式访问目标系统,使得用户只需记住登录页面这一个网址信息和用户信息,就能安全高效访问多个业务系统,提高办公效率。通过对跳转至目标系统的链接地址进行加密,防止了敏感信息泄露和恶意篡改。According to the technical solution of the embodiment of the present invention, a unified login portal is used to respond to the user's login request, and the business system to which the user has access rights is searched for the user to select the target system, and subsequently the target system is accessed by two handshakes, so that Users only need to remember the website information and user information of the login page, and they can access multiple business systems safely and efficiently, improving office efficiency. By encrypting the link address that jumps to the target system, sensitive information leakage and malicious tampering are prevented.
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (17)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111640238.7A CN114329387A (en) | 2021-12-29 | 2021-12-29 | Single sign-on control method, system, electronic device and computer-readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111640238.7A CN114329387A (en) | 2021-12-29 | 2021-12-29 | Single sign-on control method, system, electronic device and computer-readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114329387A true CN114329387A (en) | 2022-04-12 |
Family
ID=81017791
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111640238.7A Pending CN114329387A (en) | 2021-12-29 | 2021-12-29 | Single sign-on control method, system, electronic device and computer-readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114329387A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115102765A (en) * | 2022-06-22 | 2022-09-23 | 北京声智科技有限公司 | Authority configuration method and device, electronic equipment and storage medium |
CN115297346A (en) * | 2022-06-30 | 2022-11-04 | 贵阳朗玛视讯科技有限公司 | Multi-application authentication method and device based on EPG system |
CN115884110A (en) * | 2022-12-01 | 2023-03-31 | 南京鼎山信息科技有限公司 | Method and system for judging short message verification code |
CN116361753A (en) * | 2023-03-17 | 2023-06-30 | 深圳市东信时代信息技术有限公司 | Authority authentication method, device, equipment and medium |
CN117811817A (en) * | 2023-12-29 | 2024-04-02 | 北京仁光科技有限公司 | Login verification method and system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420836A (en) * | 2012-01-12 | 2012-04-18 | 中国电子科技集团公司第十五研究所 | Sign-on method and sign-on management system for service information system |
CN106330829A (en) * | 2015-06-26 | 2017-01-11 | 东方电气集团东方电机有限公司 | Method and system for realizing single signing on by using middleware |
CN107395614A (en) * | 2017-08-09 | 2017-11-24 | 深圳国泰安教育技术股份有限公司 | Single-point logging method and system |
-
2021
- 2021-12-29 CN CN202111640238.7A patent/CN114329387A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102420836A (en) * | 2012-01-12 | 2012-04-18 | 中国电子科技集团公司第十五研究所 | Sign-on method and sign-on management system for service information system |
CN106330829A (en) * | 2015-06-26 | 2017-01-11 | 东方电气集团东方电机有限公司 | Method and system for realizing single signing on by using middleware |
CN107395614A (en) * | 2017-08-09 | 2017-11-24 | 深圳国泰安教育技术股份有限公司 | Single-point logging method and system |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115102765A (en) * | 2022-06-22 | 2022-09-23 | 北京声智科技有限公司 | Authority configuration method and device, electronic equipment and storage medium |
CN115297346A (en) * | 2022-06-30 | 2022-11-04 | 贵阳朗玛视讯科技有限公司 | Multi-application authentication method and device based on EPG system |
CN115297346B (en) * | 2022-06-30 | 2023-08-25 | 贵阳朗玛视讯科技有限公司 | EPG system-based multi-application authentication method and device |
CN115884110A (en) * | 2022-12-01 | 2023-03-31 | 南京鼎山信息科技有限公司 | Method and system for judging short message verification code |
CN115884110B (en) * | 2022-12-01 | 2023-11-28 | 南京鼎山信息科技有限公司 | Method and system for judging short message verification code |
CN116361753A (en) * | 2023-03-17 | 2023-06-30 | 深圳市东信时代信息技术有限公司 | Authority authentication method, device, equipment and medium |
CN116361753B (en) * | 2023-03-17 | 2024-03-22 | 深圳市东信时代信息技术有限公司 | Authority authentication method, device, equipment and medium |
CN117811817A (en) * | 2023-12-29 | 2024-04-02 | 北京仁光科技有限公司 | Login verification method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114329387A (en) | Single sign-on control method, system, electronic device and computer-readable medium | |
US9607143B2 (en) | Provisioning account credentials via a trusted channel | |
CN113347206B (en) | Network access method and device | |
US6629246B1 (en) | Single sign-on for a network system that includes multiple separately-controlled restricted access resources | |
US8819253B2 (en) | Network message generation for automated authentication | |
US8296828B2 (en) | Transforming claim based identities to credential based identities | |
US8898764B2 (en) | Authenticating user through web extension using token based authentication scheme | |
CN111355726B (en) | Identity authorization login method and device, electronic equipment and storage medium | |
US9485246B2 (en) | Distributed authentication with data cloud | |
US11714693B2 (en) | Data driven API conversion | |
CN113411324B (en) | Method and system for realizing login authentication based on CAS and third-party server | |
CN104954330A (en) | Method of accessing data resources, device and system | |
US11153293B1 (en) | Identity information linking | |
JP2023532976A (en) | Method and system for verification of user identity | |
CN112560003A (en) | User authority management method and device | |
CN104901951B (en) | Code data processing based on mobile terminal and exchange method in a kind of Web applications | |
CN114553570B (en) | Method, device, electronic equipment and storage medium for generating token | |
CN116527341A (en) | Client-side calling rear-end interface authentication authorization security method | |
CN114338078B (en) | A CS client login method and device | |
CN112040279B (en) | Audio and video playing method and storage medium for self-defined DRM (digital rights management) | |
CN116112172B (en) | Android client gRPC interface security verification method and device | |
CN116346486A (en) | Combined login method, device, equipment and storage medium | |
CN113765876B (en) | Report processing software access method and device | |
CN115550047A (en) | Configuration-free interface authority verification method, device and system | |
CN115190483A (en) | Method and device for accessing network |
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 |