[go: up one dir, main page]

CN112104641A - Login form conversion method and device, storage medium and electronic equipment - Google Patents

Login form conversion method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112104641A
CN112104641A CN202010952858.3A CN202010952858A CN112104641A CN 112104641 A CN112104641 A CN 112104641A CN 202010952858 A CN202010952858 A CN 202010952858A CN 112104641 A CN112104641 A CN 112104641A
Authority
CN
China
Prior art keywords
login
response message
iframe
attribute
monitoring module
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.)
Granted
Application number
CN202010952858.3A
Other languages
Chinese (zh)
Other versions
CN112104641B (en
Inventor
陆文成
张洺棋
潘晓磊
窦钐实
张婷
代博文
田硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202010952858.3A priority Critical patent/CN112104641B/en
Publication of CN112104641A publication Critical patent/CN112104641A/en
Application granted granted Critical
Publication of CN112104641B publication Critical patent/CN112104641B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0815Network architectures or network communication protocols for network security for authentication of entities providing single-sign-on or federations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a login form conversion method, a device, a storage medium and electronic equipment, wherein a conversion plug-in installed on a server is used for judging whether the server initiates 302 redirection when the server receives a request message sent by a browser, intercepting a response message sent to the browser by the server when the server initiates 302 redirection and the generated 302 redirection address conforms to the address format of a CAS (central authentication service), processing the response message according to the type of the request message to obtain a first response message, and sending the first response message to the browser, so that the conversion of 'CAS single sign-on based on webpage skipping' into 'CAS single sign-on based on webpage embedded iframe popup window' is realized, the advantages of non-invasiveness and universality are achieved, and the cost required for modifying a login flow is saved.

Description

登录形式转换方法、装置、存储介质及电子设备Login form conversion method, device, storage medium and electronic device

技术领域technical field

本申请实施例涉及计算机技术领域,尤其涉及一种登录形式转换方法、装置、存储介质及电子设备。The embodiments of the present application relate to the field of computer technologies, and in particular, to a login form conversion method, device, storage medium, and electronic device.

背景技术Background technique

中心认证服务(central authentication service,CAS)是一种目前应该较为广泛的一种单点登录方式,在CAS协议中用户的身份认证过程需要经过三次浏览器跳转,具体地:用户访问Web应用中需要登录的资源时,浏览器会跳转到登录认证平台;用户在登录认证平台输入正确的登录凭证后,浏览器又跳转到Web应用的登录票根验证页面,并且在统一资源定位(uniform resource locator,URL)中包括用户的登录票根;Web应用把登录票根传送给登录认证平台进行校验,如果票根正确,浏览器最终跳转到用户要访问的资源。在此过程,用户将三次面对空白网页等待浏览器完成加载,导致用户使用体验不流畅的问题。The central authentication service (CAS) is a single sign-on method that should be widely used at present. In the CAS protocol, the user's identity authentication process needs to go through three browser jumps, specifically: when a user accesses a web application When the login resource is required, the browser will jump to the login authentication platform; after the user enters the correct login credentials in the login authentication platform, the browser jumps to the login ticket verification page of the web application, and the uniform resource location (uniform resource location) locator, URL) includes the user's login ticket stub; the web application transmits the login ticket stub to the login authentication platform for verification, and if the ticket stub is correct, the browser finally jumps to the resource that the user wants to access. During this process, the user will face a blank web page three times and wait for the browser to finish loading, resulting in an unsmooth user experience.

为提高用户的使用流畅度,现有技术中通过修改服务器Web应用的网页源代码,当用户通过浏览器访问受限资源时,CAS协议以弹窗的形式完成对用户的身份认证。In order to improve the user's use fluency, in the prior art, by modifying the web page source code of the server web application, when the user accesses restricted resources through a browser, the CAS protocol completes the user's identity authentication in the form of a pop-up window.

然而,现有技术中存在通用性低和原有登录功能恢复难度大的问题。However, the prior art has the problems of low versatility and difficulty in restoring the original login function.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供一种登录形式转换方法、装置、存储介质及电子设备,用以解决现有技术中通用性低和原有登录功能恢复难度大的问题。Embodiments of the present application provide a login form conversion method, device, storage medium and electronic device, which are used to solve the problems of low versatility and difficulty in restoring the original login function in the prior art.

第一方面,本申请实施例提供一种登录形式转换方法,应用于服务器上安装的转换插件;所述方法包括:In the first aspect, an embodiment of the present application provides a login form conversion method, which is applied to a conversion plug-in installed on a server; the method includes:

在服务器接收到浏览器发送的请求报文时,判断所述服务器是否发起302重定向;When the server receives the request message sent by the browser, determine whether the server initiates 302 redirection;

在确定所述服务器发起了302重定向且产生的302重定向地址符合中心认证服务CAS的地址格式时,拦截所述服务器发送给所述浏览器的响应报文;When it is determined that the server initiates 302 redirection and the generated 302 redirection address conforms to the address format of the central authentication service CAS, intercepting the response message sent by the server to the browser;

根据所述请求报文的类型,对所述响应报文进行处理,得到第一响应报文;processing the response message according to the type of the request message to obtain a first response message;

将所述第一响应报文发送给浏览器。Send the first response message to the browser.

可选地,所述根据所述请求报文的类型,对所述响应报文进行处理,得到第一响应报文,包括:Optionally, according to the type of the request message, the response message is processed to obtain a first response message, including:

若所述请求报文的类型为异步JavaScript和可扩展标记语言Ajax请求,将所述响应报文的报文头中的超文本传输协议HTTP状态码修改为200;If the type of the request message is an asynchronous JavaScript and extensible markup language Ajax request, modify the hypertext transfer protocol HTTP status code in the header of the response message to 200;

在所述响应报文的报文头中增加认证事件属性和认证成功跳转属性,所述认证事件属性的属性值为所述302重定向地址,所述认证成功跳转属性的属性值为所述服务器中存储的登录成功跳转统一资源定位符URL。An authentication event attribute and an authentication successful jump attribute are added to the header of the response packet, the attribute value of the authentication event attribute is the 302 redirect address, and the attribute value of the authentication successful jump attribute is all The login successfully jumps to the Uniform Resource Locator URL stored in the above server.

可选地,所述根据所述请求报文的类型,对所述响应报文进行处理,得到第一响应报文,包括:Optionally, according to the type of the request message, the response message is processed to obtain a first response message, including:

若所述请求报文的类型为非异步JavaScript和可扩展标记语言Ajax请求,将所述响应报文的报文头中的超文本传输协议HTTP状态码修改为200;If the type of the request message is a non-asynchronous JavaScript and extensible markup language Ajax request, modify the hypertext transfer protocol HTTP status code in the header of the response message to 200;

在所述响应报文的报文头中增加认证成功跳转属性,所述认证成功跳转属性的属性值为所述服务器中存储的登录成功跳转统一资源定位符URL;adding an authentication-successful jump attribute to the header of the response message, and the attribute value of the authentication-successful jump attribute is the login-successful jump uniform resource locator URL stored in the server;

为所述响应报文填充报文体,所述报文体包括内嵌iframe的登录弹窗的代码和监听模块的代码,所述内嵌iframe的登录弹窗中iframe的网址源为所述302重定向地址。Filling the message body for the response message, the message body includes the code of the iframe-embedded login pop-up window and the code of the monitoring module, and the URL source of the iframe in the iframe-embedded login pop-up window is the 302 redirection address.

可选地,所述方法还包括:Optionally, the method further includes:

若确定所述服务器未发起302重定向,则拦截所述服务器发送给所述浏览器的响应报文;If it is determined that the server does not initiate 302 redirection, intercept the response message sent by the server to the browser;

判断所述响应报文的报文体的内容类型是否为超文本标记语言HTML格式;Judging whether the content type of the message body of the response message is HTML format;

若所述响应报文的报文体的内容类型为HTML格式,则在所述响应报文的报文体中插入监听模块的代码,得到第二响应报文;If the content type of the message body of the response message is HTML format, insert the code of the monitoring module into the message body of the response message to obtain the second response message;

将所述第二响应报文发送给所述浏览器。Send the second response message to the browser.

第二方面,本申请实施例提供一种登录形式转换方法,应用于终端设备的浏览器,所述方法包括:In a second aspect, an embodiment of the present application provides a login form conversion method, which is applied to a browser of a terminal device, and the method includes:

接收服务器发送的第一响应报文;Receive the first response message sent by the server;

对所述第一响应报文进行处理,确定所述浏览器中当前处于打开状态的网页对应的监听模块;processing the first response message to determine the monitoring module corresponding to the web page currently in the open state in the browser;

利用所述监听模块和所述第一响应报文,生成内嵌iframe的登录弹窗;Utilize the monitoring module and the first response message to generate an iframe-embedded login pop-up window;

利用所述监听模块根据所述内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制所述内嵌iframe的登录弹窗执行与所述属性值对应的操作。Using the monitoring module, according to the attribute value of the location attribute of the iframe in the login popup window embedded with the iframe, the login popup window embedded with the iframe is controlled to perform an operation corresponding to the attribute value.

可选地,所述利用所述监听模块和所述第一响应报文,生成内嵌iframe的登录弹窗,包括:Optionally, using the monitoring module and the first response message to generate an iframe-embedded login pop-up window, including:

利用所述监听模块对所述第一响应报文进行处理,确定所述第一响应报文的报文头包括认证成功跳转属性、所述第一响应报文的报文体包括内嵌iframe的登录弹窗的代码,所述认证成功跳转属性的属性值为登录成功跳转统一资源定位符URL,所述内嵌iframe的登录弹窗中iframe的网址源为302重定向地址;The first response packet is processed by the monitoring module, and it is determined that the packet header of the first response packet includes an authentication success jump attribute, and the packet body of the first response packet includes an iframe-embedded The code of the login pop-up window, the attribute value of the authentication successful jump attribute is the login successful jump uniform resource locator URL, and the URL source of the iframe in the login pop-up window with the embedded iframe is the 302 redirect address;

对所述内嵌iframe的登录弹窗的代码进行渲染,得到所述内嵌iframe的登录弹窗。Rendering the code of the login popup window embedded in the iframe to obtain the login popup window embedded in the iframe.

可选地,所述利用所述监听模块和所述第一响应报文,生成内嵌iframe的登录弹窗,包括:Optionally, using the monitoring module and the first response message to generate an iframe-embedded login pop-up window, including:

利用所述监听模块对所述第一响应报文进行处理,确定所述第一响应报文的报文头包括认证事件属性和认证成功跳转属性,所述认证事件属性的属性值为302重定向地址,所述认证成功跳转属性的属性值为登录成功跳转统一资源定位符URL;The first response packet is processed by the monitoring module, and it is determined that the packet header of the first response packet includes an authentication event attribute and an authentication successful jump attribute, and the attribute value of the authentication event attribute is 302. Orientation address, the attribute value of the authentication successful jump attribute is the login successful jump uniform resource locator URL;

通过所述监听模块根据所述认证事件属性的属性值,构建所述内嵌iframe的登录弹窗。The monitoring module constructs the login pop-up window embedded in the iframe according to the attribute value of the authentication event attribute.

可选地,所述对所述第一响应报文进行处理,确定所述浏览器中当前处于打开状态的网页对应的监听模块之前,所述方法,还包括:Optionally, the method further includes:

接收服务器发送的第二响应报文,所述第二响应报文的报文体包括监听模块的代码;receiving a second response message sent by the server, where the message body of the second response message includes the code of the monitoring module;

相应地,所述对所述第一响应报文进行处理,确定所述浏览器中当前处于打开状态的网页对应的监听模块,包括:Correspondingly, the processing of the first response message to determine the monitoring module corresponding to the web page currently in the open state in the browser includes:

对所述第一响应报文进行处理,确定所述第一响应报文的报文头中包括认证事件属性;processing the first response message, and determining that the header of the first response message includes an authentication event attribute;

对所述第二响应报文的报文体中监听模块的代码进行实例化,得到所述浏览器中当前处于打开状态的网页对应的监听模块。The code of the monitoring module in the message body of the second response message is instantiated to obtain the monitoring module corresponding to the web page currently in the open state in the browser.

可选地,所述对所述第一响应报文进行处理,确定所述浏览器中当前处于打开状态的网页对应的监听模块,包括:Optionally, the processing of the first response message to determine the monitoring module corresponding to the web page currently in the open state in the browser includes:

对所述第一响应报文进行处理,确定所述第一响应报文的报文头中不包括认证事件属性且第一响应报文的报文体中包括监听模块的代码;processing the first response message, and determining that the header of the first response message does not include the authentication event attribute and the message body of the first response message includes the code of the monitoring module;

对所述第一响应报文的报文体中监听模块的代码进行实例化,得到所述浏览器中当前处于打开状态的网页对应的监听模块。The code of the monitoring module in the message body of the first response message is instantiated to obtain the monitoring module corresponding to the web page currently in the open state in the browser.

可选地,所述根据所述内嵌iframe的登录弹窗中iframe的位置属性的属性值,利用所述监听模块控制所述内嵌iframe的登录弹窗执行所述属性值对应的操作之前,所述方法还包括:Optionally, according to the attribute value of the location attribute of the iframe in the login pop-up window of the embedded iframe, before using the monitoring module to control the login pop-up window of the embedded iframe to perform the operation corresponding to the attribute value, The method also includes:

利用监听模块控制所述内嵌iframe的登录弹窗为隐藏状态;Use the monitoring module to control the login pop-up window of the embedded iframe to be in a hidden state;

相应地,所述根据所述内嵌iframe的登录弹窗中iframe的位置属性的属性值,利用所述监听模块控制所述内嵌iframe的登录弹窗执行所述属性值对应的操作,包括:Correspondingly, according to the attribute value of the location attribute of the iframe in the login pop-up window of the embedded iframe, using the monitoring module to control the login pop-up window of the embedded iframe to perform the operation corresponding to the attribute value, including:

利用所述监听模块判断所述iframe的位置属性的属性值能否在预设时间阈值内变成登录成功跳转URL;Utilize the monitoring module to judge whether the attribute value of the location attribute of the iframe can become a successful login jump URL within a preset time threshold;

若所述iframe的位置属性的属性值不能在预设时间阈值内变成登录成功跳转URL,利用所述监听模块控制所述登录弹窗显示;If the attribute value of the location attribute of the iframe cannot become a successful login jump URL within a preset time threshold, the monitoring module is used to control the login pop-up window display;

当所述iframe的位置属性的属性值发生变化时,利用所述监听模块判断所述iframe的位置属性的属性值是否等于所述登录成功跳转URL;When the attribute value of the location attribute of the iframe changes, use the monitoring module to judge whether the attribute value of the location attribute of the iframe is equal to the successful login jump URL;

若所述iframe的位置属性的属性值等于所述登录成功跳转URL,则利用所述监听模块将所述登录弹窗设置为隐藏状态并控制当前网页显示认证成功提示消息。If the attribute value of the location attribute of the iframe is equal to the successful login redirection URL, the monitoring module is used to set the login popup window to a hidden state and control the current webpage to display an authentication success prompt message.

可选地,所述方法还包括:Optionally, the method further includes:

若所述iframe的位置属性的属性值能在预设时间阈值内变成登录成功跳转URL,则当所述iframe的位置属性的属性值发生变化时,利用所述监听模块判断所述iframe的位置属性的属性值是否等于所述登录成功跳转URL;If the attribute value of the location attribute of the iframe can become a successful login jump URL within the preset time threshold, then when the attribute value of the location attribute of the iframe changes, the monitoring module is used to determine the value of the iframe. Whether the attribute value of the location attribute is equal to the successful login redirect URL;

若所述iframe的位置属性的属性值所述登录成功跳转URL,则利用所述监听模块控制当前网页显示认证成功提示消息。If the attribute value of the location attribute of the iframe is the successfully redirected URL, the monitoring module is used to control the current webpage to display an authentication success prompt message.

第三方面,本申请实施例提供一种登录形式转换装置,包括:In a third aspect, an embodiment of the present application provides a login form conversion device, including:

处理单元,用于在服务器接收到浏览器发送的请求报文时,判断所述服务器是否发起302重定向;在确定所述服务器发起了302重定向且产生的302重定向地址符合中心认证服务CAS的地址格式时,拦截所述服务器发送给所述浏览器的响应报文;根据所述请求报文的类型,对所述响应报文进行处理,得到第一响应报文;The processing unit is used to judge whether the server initiates 302 redirection when the server receives the request message sent by the browser; after determining that the server initiates 302 redirection and the generated 302 redirection address conforms to the central authentication service CAS When the address format is in the address format, intercept the response message sent by the server to the browser; process the response message according to the type of the request message to obtain the first response message;

收发单元,用于将所述第一响应报文发送给浏览器。A transceiver unit, configured to send the first response message to the browser.

第四方面,本申请实施例提供一种登录形式转换装置,包括:In a fourth aspect, an embodiment of the present application provides a login form conversion device, including:

收发单元,用于接收服务器发送的第一响应报文;a transceiver unit, configured to receive the first response message sent by the server;

处理单元,用于对所述第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块;利用所述监听模块和所述第一响应报文,生成内嵌iframe的登录弹窗;利用所述监听模块根据所述内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制所述内嵌iframe的登录弹窗执行与所述属性值对应的操作。The processing unit is used to process the first response message, and determine the monitoring module corresponding to the web page currently in the open state in the browser; use the monitoring module and the first response message to generate an embedded iframe Login pop-up window; use the monitoring module to control the login pop-up window of the embedded iframe to perform the operation corresponding to the attribute value according to the attribute value of the location attribute of the iframe in the login pop-up window of the embedded iframe.

第五方面,本申请实施例提供一种服务器,包括:收发器、存储器和处理器;所述存储器用于存储计算机程序,所述处理器执行所述计算机程序实现上述第一方面所述的登录形式转换方法。In a fifth aspect, an embodiment of the present application provides a server, including: a transceiver, a memory, and a processor; the memory is used to store a computer program, and the processor executes the computer program to implement the login described in the first aspect above Form conversion method.

第六方面,本申请实施例提供一种终端设备,包括:收发器、存储器和处理器;所述存储器用于存储计算机程序,所述处理器执行所述计算机程序实现如上述第二方面所述的登录形式转换方法。In a sixth aspect, an embodiment of the present application provides a terminal device, including: a transceiver, a memory, and a processor; the memory is used to store a computer program, and the processor executes the computer program to achieve the above-mentioned second aspect The login form conversion method.

第七方面,本申请实施例提供一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序用于实现如上述第一方面所述的登录形式转换方法。In a seventh aspect, an embodiment of the present application provides a storage medium, where the storage medium is used to store a computer program, and the computer program is used to implement the login form conversion method described in the first aspect above.

第八方面,本申请实施例提供一种存储介质,所述存储介质用于存储计算机程序,所述计算机程序用于实现如上述第二方面所述的登录形式转换方法。In an eighth aspect, an embodiment of the present application provides a storage medium, where the storage medium is used to store a computer program, and the computer program is used to implement the login form conversion method described in the second aspect above.

本申请实施例提供的登录形式转换方法、装置、存储介质及电子设备,通过服务器上安装的转换插件,在服务器接收到浏览器发送的请求报文时,判断服务器是否发起302重定向,在确定服务器发起了302重定向且产生的302重定向地址符合中心认证服务CAS的地址格式时,拦截服务器发送给浏览器的响应报文,根据请求报文的类型,对响应报文进行处理,得到第一响应报文,将第一响应报文发送给浏览器,通过终端设备上安装的浏览器,在接收到服务器发送的第一响应报文时,对第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块,利用监听模块和第一响应报文,生成内嵌iframe的登录弹窗,利用监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与属性值对应的操作,通过在服务器上安装转换插件,在不对服务器的源代码进行改动的情况下,实现了把“基于网页跳转的CAS单点登录”转换成“基于网页内嵌iframe弹窗的CAS单点登录”,通过一键安装或一键卸载,就可以实现不同服务器上转换插件的安装或卸载,操作简单,且由于转换插件不侵入源代码,节省了改造登录流程所需的成本。The login form conversion method, device, storage medium, and electronic device provided by the embodiments of the present application, through the conversion plug-in installed on the server, when the server receives the request message sent by the browser, it is determined whether the server initiates 302 redirection, and after determining When the server initiates a 302 redirect and the generated 302 redirect address conforms to the address format of the central authentication service CAS, it intercepts the response message sent by the server to the browser, processes the response message according to the type of the request message, and obtains the first a response message, send the first response message to the browser, and through the browser installed on the terminal device, when receiving the first response message sent by the server, process the first response message to determine the browser The monitoring module corresponding to the web page currently in the open state uses the monitoring module and the first response message to generate a login pop-up window with an embedded iframe, and uses the monitoring module according to the property value of the location attribute of the iframe in the login pop-up window with the embedded iframe. , control the login pop-up window embedded in the iframe to perform the operation corresponding to the attribute value, by installing the conversion plug-in on the server, without changing the source code of the server, the "CAS single sign-on based on web page jumping" is realized. ” is converted into “CAS single sign-on based on the iframe pop-up window embedded in the webpage”, through one-click installation or one-click uninstallation, the installation or uninstallation of the conversion plug-in on different servers can be realized. The operation is simple, and because the conversion plug-in does not invade the source code, saving the cost of retrofitting the login process.

附图说明Description of drawings

为了更清楚地说明本申请或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the present application or the prior art more clearly, the following briefly introduces the accompanying drawings required in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are the For some embodiments of the application, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为现有技术中基于中心认证服务的登录认证系统的结构示意图;1 is a schematic structural diagram of a login authentication system based on a central authentication service in the prior art;

图2为本申请实施例提供的登录形式转换方法实施例一的流程示意图;2 is a schematic flowchart of Embodiment 1 of a method for converting a login form provided by an embodiment of the present application;

图3为本申请实施例提供的登录形式转换方法实施例二的流程示意图;3 is a schematic flowchart of Embodiment 2 of a method for converting a login form provided by an embodiment of the present application;

图4为本申请实施例提供的登录形式转换装置实施例一的结构示意图;FIG. 4 is a schematic structural diagram of Embodiment 1 of a login form conversion apparatus provided by an embodiment of the present application;

图5为本申请实施例提供的登录形式转换装置实施例二的结构示意图;FIG. 5 is a schematic structural diagram of Embodiment 2 of a login form conversion device provided by an embodiment of the present application;

图6为本申请提供的服务器实施例的结构示意图;FIG. 6 is a schematic structural diagram of a server embodiment provided by the present application;

图7为本申请提供的终端设备实施例的结构示意图。FIG. 7 is a schematic structural diagram of an embodiment of a terminal device provided by the present application.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本申请相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本申请的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as recited in the appended claims.

下面将以CAS登录认证系统为例,对本申请的技术方案进行详细描述,可以理解的是,本申请实施例提供的登录形式转换方法、装置、存储介质及电子设备也适用于使用其他产品实现登录认证的Web系统中,如基于QQ登录和GitHub OAuth的Web系统,此处不作限制。The following will take the CAS login authentication system as an example to describe the technical solution of the present application in detail. It can be understood that the login form conversion method, device, storage medium and electronic device provided by the embodiments of the present application are also applicable to the use of other products to realize login Among the authenticated web systems, such as web systems based on QQ login and GitHub OAuth, there are no restrictions here.

现有技术中,为了限制用户对受保护的服务功能或资源的访问,CAS系统需要对用户的身份进行认证,即登录认证,从而保证只有授权的用户才能访问或使用受保护的服务功能或资源,示例性地,图1为现有技术中基于中心认证服务的登录认证系统的结构示意图,如图1所示,CAS登录认证系统中包括终端设备(其上安装有浏览器或者与浏览器有相同功能的应用)、统一认证中心、Web服务器,其中,Web服务器用于安装有Web应用(使用统一认证中心的账号进行登录的软件),在CAS登录认证系统中Web服务器可以有多个,不同的Web服务器对应不同的Web应用。以两个Web服务器,Web服务器A和Web服务器B为例进行说明,Web服务器A和Web服务器B为分别为Web应用a和Web应用b对应的Web服务器:In the prior art, in order to restrict users' access to protected service functions or resources, the CAS system needs to authenticate the user's identity, that is, login authentication, so as to ensure that only authorized users can access or use protected service functions or resources. , exemplarily, Figure 1 is a schematic structural diagram of a login authentication system based on a central authentication service in the prior art. As shown in Figure 1, the CAS login authentication system includes a terminal device (a browser is installed on it or has a connection with the browser). applications with the same function), unified authentication center, and web server, where the web server is used to install web applications (software that uses the account of the unified authentication center to log in), and there can be multiple web servers in the CAS login authentication system. The web servers correspond to different web applications. Take two web servers, web server A and web server B, as examples for illustration. Web server A and web server B are web servers corresponding to web application a and web application b respectively:

场景一:当未登录用户第一次访问Web服务器A的受保护资源时,整个登录认证流程如下:Web服务器A通过过滤器判断用户是否登录,当确定用户没有登录时,重定向(302)到统一认证中心,并将重定向地址发送给浏览器;浏览器根据重定向地址发起重定向,并在统一认证中心返回的登录页面中输入用户的个人信息(如用户名和密码);统一认证中心验证输入的个人信息是否有效,验证成功后,统一认证中心给浏览器返回一个特殊的凭证(登录票根);浏览器收到登录票根后,重定向到Web服务器A,并在URL中包括登录票根;Web服务器A通过过滤器取出登录票根,并将该登录票根发送到统一认证中心,以使统一认证中心验证该登录票根是否有效;当Web服务器A收到统一认证中心发送的该登录票根有效的消息时,表示用户的身份认证完成,Web服务器A在浏览器上展示用户请求的Web应用a的资源。Scenario 1: When an unlogged user accesses the protected resources of Web server A for the first time, the entire login authentication process is as follows: Web server A determines whether the user is logged in through a filter, and when it is determined that the user is not logged in, redirects (302) to Unified authentication center, and send the redirection address to the browser; the browser initiates a redirection according to the redirection address, and enters the user's personal information (such as user name and password) in the login page returned by the unified authentication center; the unified authentication center verifies Whether the entered personal information is valid, after successful verification, the unified authentication center returns a special credential (login stub) to the browser; after the browser receives the login stub, it redirects to Web server A, and includes the login stub in the URL; Web server A takes out the login ticket stub through the filter, and sends the login ticket stub to the unified authentication center, so that the unified authentication center can verify whether the login ticket stub is valid; when the web server A receives a message from the unified authentication center that the login ticket is valid When the user's identity authentication is completed, the web server A displays the resources of the web application a requested by the user on the browser.

场景二:当该用户在访问软件平台A的资源时,又突然发起访问Web服务器B上的资源的请求,其登录认证流程如下:由于用户第一次访问Web服务器B,于是Web服务器B通过302重定向,使浏览器到统一认证中心进行登录认证;由于该浏览器之前已使用过统一认证中心进行过身份认证(访问Web服务器A时),因此,统一认证中心不会再返回登录页面获取用户的个人信息,而是直接给浏览器签发一个登录票根,并使浏览器重定向到Web服务器B,Web服务器B获取登录票根到统一认证中心进行验证,验证成功后,Web服务器B在浏览器上展示用户请求的软件平台B的资源。Scenario 2: When the user is accessing the resources of the software platform A, he suddenly initiates a request to access the resources on the web server B. The login authentication process is as follows: Since the user accesses the web server B for the first time, the web server B passes 302 Redirect the browser to the unified authentication center for login authentication; since the browser has used the unified authentication center for identity authentication before (when accessing Web server A), the unified authentication center will not return to the login page to obtain users Instead, it directly issues a login ticket to the browser and redirects the browser to Web server B. Web server B obtains the login ticket and sends it to the unified authentication center for verification. Display the resources of the software platform B requested by the user.

由上述分析可知,在CAS登录认证系统中,未登录用户第一次访问Web应用的需要登录才有权限访问的资源,进行登录认证的过程需要经过三次浏览器跳转,分别为:跳转到统一认证中心的身份认证页面、跳转到Web服务器登录票根验证页面和跳转到登录成功后的回显页。在此过程中用户将三次面对空白网页等待浏览器完成加载,导致用户使用体验不流畅的问题。It can be seen from the above analysis that, in the CAS login authentication system, the first time an unlogged user accesses the resources of the web application that only need to log in to access the resources, the process of login authentication requires three browser jumps, namely: jump to The identity authentication page of the unified authentication center, jump to the web server login ticket stub verification page, and jump to the echo page after successful login. During this process, the user will face a blank web page three times and wait for the browser to finish loading, resulting in an unsmooth user experience.

为解决CAS登录认证过程中存在的不足,现有技术中提出一种通过修改Web应用的网页源代码的方法,当用户访问受保护资源时,实现通过弹窗形式完成对用户的身份认证,然而这种方法,一方面,针对不同企业不同服务器,需要分别进行相应的代码修改操作,不具有通用性,另一方面,该方法具有代码侵入性,当需要恢复原本登录功能时,需要进行代码的恢复,可恢复性差,操作难度大。In order to solve the shortcomings in the CAS login authentication process, a method is proposed in the prior art to modify the source code of the web page of the web application. When the user accesses the protected resource, the user's identity authentication is completed in the form of a pop-up window. This method, on the one hand, requires corresponding code modification operations for different servers of different enterprises, which is not universal. On the other hand, this method has code intrusion. Recovery, poor recoverability, and difficult operation.

本申请技术方案的主要思路:基于现有技术中存在的问题,本申请提供一种通过转换插件实现登录认证的方法,在指定Web服务器安装转换插件后不需要改造任何源代码就能把“基于网页跳转的CAS单点登录”转换成“基于网页内嵌iframe弹窗的CAS单点登录”,具有非侵入性和通用性的优势,节省了改造登录流程所需的成本。The main idea of the technical solution of the present application: Based on the problems existing in the prior art, the present application provides a method for realizing login authentication through a conversion plug-in. The conversion of "CAS single sign-on for web page jumping" into "CAS single sign-on based on web page embedded iframe pop-up window" has the advantages of non-intrusiveness and versatility, and saves the cost of transforming the login process.

图2为本申请实施例提供的登录形式转换方法实施例一的流程示意图,本实施例中Web服务器上预先安装有转换插件,终端设备上预先安装有浏览器,本实施例的方法应用在Web服务器的转换插件与终端设备的浏览器之间,如图2所示,本实施例的方法包括:2 is a schematic flowchart of Embodiment 1 of a method for converting a login form provided by an embodiment of the present application. In this embodiment, a conversion plug-in is pre-installed on a Web server, and a browser is pre-installed on a terminal device. The method in this embodiment is applied to the Web Between the conversion plug-in of the server and the browser of the terminal device, as shown in FIG. 2 , the method of this embodiment includes:

S101、转换插件在服务器接收到浏览器发送的请求报文时,判断服务器是否发起302重定向。S101. When the server receives the request message sent by the browser, the conversion plug-in determines whether the server initiates 302 redirection.

由前述分析可知,在CAS登录认证过程中,若用户在未登录状态下通过浏览器请求访问受保护资源(用户在登录状态下才有权限访问的资源),服务器在接收到请求报文时,CAS过滤器会触发302重定向,若用户在登录状态下通过浏览器访问资源(包括受保护资源和其他资源)或者在未登录状态下通过浏览器访问其他资源(除受保护资源以外的网络资源),服务器在接收到请求报文时,CAS过滤器不会触发302重定向。本步骤中,当服务器接收到浏览器发送的请求报文时,转换插件判断服务器是否通过过滤器发起302重定向,并根据判断结果执行相应的操作。It can be seen from the above analysis that during the CAS login authentication process, if the user requests to access protected resources (resources that the user has permission to access only when the user is logged in) through the browser without logging in, when the server receives the request message, The CAS filter will trigger a 302 redirect, if the user accesses resources (including protected resources and other resources) through the browser in the logged-in state, or accesses other resources (network resources other than protected resources) through the browser in the logged-in state ), when the server receives the request message, the CAS filter will not trigger a 302 redirect. In this step, when the server receives the request message sent by the browser, the conversion plug-in determines whether the server initiates 302 redirection through the filter, and performs corresponding operations according to the determination result.

其中,请求报文用于请求读取或者获取相关的网络资源,如网页、数据包等,请求报文中包括待访问资源的地址和浏览器的状态等,浏览器的状态包括用户登录状态和用户未登录状态,即用户是否已登录浏览器,待访问资源的地址即用户请求访问的资源的统一资源定位符(uniform resource locator,URL)。服务器会根据接收到的请求报文生成相应的响应报文,并将响应报文发送给对应浏览器,例如,服务器根据请求报文确定浏览器的状态为用户未登录状态且待访问资源为受保护资源时,服务器将包括302重定向地址的响应报文发送给浏览器,其他情况下,服务器直接将包括待访问资源的响应报文发送给浏览器。Among them, the request message is used to request to read or obtain related network resources, such as web pages, data packets, etc. The request message includes the address of the resource to be accessed and the status of the browser, etc. The status of the browser includes the user login status and The user is not logged in, that is, whether the user has logged in to the browser, and the address of the resource to be accessed is the uniform resource locator (uniform resource locator, URL) of the resource that the user requests to access. The server will generate a corresponding response message according to the received request message, and send the response message to the corresponding browser. For example, the server determines according to the request message that the status of the browser is that the user is not logged in and that the resource to be accessed is under the status of the user. When protecting resources, the server sends a response message including a 302 redirect address to the browser, and in other cases, the server directly sends a response message including the resource to be accessed to the browser.

S102、转换插件在确定服务器发起了302重定向且产生的302重定向地址符合CAS的地址格式时,拦截服务器发送给浏览器的响应报文。S102, the conversion plug-in intercepts the response message sent by the server to the browser when it is determined that the server initiates a 302 redirection and the generated 302 redirection address conforms to the address format of the CAS.

本步骤中,当转换插件确定服务器发起了302重定向且产生的302重定向地址符合CAS的地址格式时,说明浏览器是用户未登录状态下请求访问受保护资源,并且服务器与浏览器之间采用的是CAS认证机制,此时,转换插件拦截服务器发送给浏览器响应报文,该响应报文的报文头包括HTTP状态码和302重定向地址,其中,超文本传输协议(hypertexttransfer prltocol,HTTP)状态码为302。In this step, when the conversion plug-in determines that the server has initiated a 302 redirect and the generated 302 redirect address conforms to the CAS address format, it means that the browser is requesting access to protected resources when the user is not logged in, and there is a connection between the server and the browser. The CAS authentication mechanism is used. At this time, the conversion plug-in intercepts the response message sent by the server to the browser. The header of the response message includes the HTTP status code and the 302 redirection address. Among them, the hypertext transfer protocol (hypertext transfer prltocol, HTTP) status code is 302.

在一种可能的实现方式中,转换插件通过监控服务器操作,确服务器是否发起了302重定向及产生的302重定向的地址格式。In a possible implementation manner, the conversion plug-in monitors the operation of the server to determine whether the server initiates 302 redirection and the address format of the generated 302 redirection.

在另一种可能的实现方式中,转换插件通过读取服务器生成的响应报文,确定服务器是否发起了302重定向及产生的302重定向的地址格式。In another possible implementation manner, the conversion plug-in determines whether the server initiates 302 redirection and the address format of the generated 302 redirection by reading the response message generated by the server.

S103、转换插件根据请求报文的类型,对响应报文进行处理,得到第一响应报文。S103. The conversion plug-in processes the response message according to the type of the request message to obtain a first response message.

本步骤中,在确定服务器发起了302重定向且产生的302重定向地址符合CAS的地址格式时,转换插件拦截服务器发送给浏览器的响应报文,并根据请求报文的类型,对该响应报文进行处理,得到第一响应报文。In this step, when it is determined that the server initiates 302 redirection and the generated 302 redirection address conforms to the CAS address format, the conversion plug-in intercepts the response message sent by the server to the browser, and according to the type of the request message, responds to the The message is processed to obtain a first response message.

需要说明的是,本实施例中,转换插件具有随时读取服务器接收到的请求报文及生成的响应报文的功能,并且具有拦截响应报文和对响应报文进行处理的功能。It should be noted that, in this embodiment, the conversion plug-in has the function of reading the request message received by the server and the generated response message at any time, and has the function of intercepting the response message and processing the response message.

其中,请求报文的类型包括异步JavaScript和可扩展标记语言(asynchronousjavascript and XML,Ajax,其中,XML是extensible markup language的缩写)请求和非Ajax请求(除Ajax请求之外的其他请求)。The types of the request message include asynchronous JavaScript and Extensible Markup Language (asynchronous javascript and XML, Ajax, where XML is an abbreviation for extensible markup language) requests and non-Ajax requests (other requests except Ajax requests).

Ajax是一种异步请求数据的web开发技术,简单地说,在不需要重新刷新页面的情况下,Ajax通过异步请求加载后台数据,并在网页上呈现出来。常见运用场景有表单验证是否登入成功、百度搜索下拉框提示和快递单号查询等等。相应地,Ajax请求获取的是数据而不是HTML文档。因此,Ajax请求一类较为特殊的请求。Ajax is a web development technology that requests data asynchronously. Simply put, Ajax loads background data through asynchronous requests and renders it on the web page without the need to refresh the page. Common application scenarios include form verification whether the login is successful, Baidu search drop-down box prompts, and express tracking number query. Accordingly, Ajax requests fetch data rather than HTML documents. Therefore, Ajax requests are a special kind of request.

本实施例中,转换插件可以根据请求报文的报文头确定该请求报文的类型是Ajax请求还是非Ajax请求。根据请求报文的不同类型,转换插件会对响应报文执行不同的处理,并产生不同的第一响应报文:In this embodiment, the conversion plug-in may determine whether the type of the request packet is an Ajax request or a non-Ajax request according to the packet header of the request packet. According to different types of request packets, the conversion plug-in will perform different processing on the response packets and generate different first response packets:

在一种可能的实现方式中,当请求报文的类型为Ajax请求时,转换插件对响应报文执行如下处理,得到第一响应报文:In a possible implementation manner, when the type of the request message is an Ajax request, the conversion plug-in performs the following processing on the response message to obtain the first response message:

(1)将响应报文的报文头中的HTTP状态码修改为200;(1) Modify the HTTP status code in the header of the response message to 200;

(2)在响应报文的报文头中增加认证事件属性和认证成功跳转属性,其中,认证事件属性的属性值为所述302重定向地址,认证成功跳转属性的属性值为服务器中存储的登录成功跳转URL。(2) Add the authentication event attribute and the authentication successful jump attribute in the header of the response message, wherein the attribute value of the authentication event attribute is the 302 redirection address, and the attribute value of the authentication successful jump attribute is the server The stored redirect URL for successful login.

在另一种可能的实现方式中,当请求报文的类型为非Ajax请求,转换插件对响应报文执行如下处理,得到第一响应报文:In another possible implementation manner, when the type of the request message is a non-Ajax request, the conversion plug-in performs the following processing on the response message to obtain the first response message:

(1)将响应报文的报文头中的HTTP状态码修改为200;(1) Modify the HTTP status code in the header of the response message to 200;

(2)在响应报文的报文头中增加认证成功跳转属性,认证成功跳转属性的属性值为服务器中存储的登录成功跳转URL;(2) adding an authentication success jump attribute to the header of the response message, and the attribute value of the authentication success jump attribute is the login success jump URL stored in the server;

(3)为响应报文填充报文体,报文体包括内嵌iframe的登录弹窗的代码和监听模块的代码,内嵌iframe的登录弹窗中iframe的网址源(src)为302重定向地址。(3) Filling the message body for the response message, the message body includes the code of the iframe-embedded login pop-up window and the code of the monitoring module, and the URL source (src) of the iframe in the iframe-embedded login pop-up window is the 302 redirect address.

不难理解的是,本实施例中,将响应报文的报文头中的HTTP状态码修改为200,是指将响应报文的报文头中的HTTP状态码由302修改为200,即取消302重定向。200为表示从浏览器发送来的请求在服务器被正确处理的HTTP状态码。It is not difficult to understand that, in this embodiment, modifying the HTTP status code in the header of the response packet to 200 refers to modifying the HTTP status code in the header of the response packet from 302 to 200, that is, Cancel the 302 redirect. 200 is the HTTP status code that indicates that the request sent from the browser was correctly processed by the server.

监听模块的代码用于浏览器实例化出监听模块,监听模块可以在浏览器中执行相应的操作。The code of the monitoring module is used by the browser to instantiate the monitoring module, and the monitoring module can perform corresponding operations in the browser.

iframe是HTML标签,作用是文档中的文档,或者浮动的框架(frame)。iframe元素会创建包含另外一个文档的内联框架(即行内框架)。网址源(src)是被嵌套的网页的网址。An iframe is an HTML tag that acts as a document within a document, or a floating frame (frame). The iframe element creates an inline frame (ie, an inline frame) that contains another document. The URL source (src) is the URL of the nested web page.

因此,最终得到的第一响应报文包含两种可能的情况,一种是报文头包括HTTP状态码200、认证事件属性和认证成功跳转属性第一响应报文,另一种是报文头包括HTTP状态码200和认证成功跳转属性、报文体包括内嵌iframe的登录弹窗的代码和监听模块的代码的第一响应报文。转换插件根据请求报文的类型,生成两种第一响应报文的一种,即两种第一响应报文不可能同时存在。Therefore, the finally obtained first response message contains two possible situations. One is that the message header includes the HTTP status code 200, the authentication event attribute and the authentication successful jump attribute. The first response message, the other is the message The header includes the HTTP status code 200 and the authentication success jump attribute, and the message body includes the code of the login pop-up window embedded in the iframe and the first response message of the code of the monitoring module. The conversion plug-in generates one of two kinds of first response messages according to the type of the request message, that is, the two kinds of first response messages cannot exist at the same time.

S104、转换插件将第一响应报文发送给浏览器。S104, the conversion plug-in sends the first response message to the browser.

本步骤中,在S104之后,转换插件将S103中生成的第一响应报文发送给浏览器,相应地,浏览器完成第一响应报文的接收。In this step, after S104, the conversion plug-in sends the first response message generated in S103 to the browser, and accordingly, the browser completes the reception of the first response message.

可选地,在S101中,若确定服务器未发起302重定向,本实施例的方法还包括:Optionally, in S101, if it is determined that the server does not initiate 302 redirection, the method of this embodiment further includes:

转换插件拦截所述服务器发送给浏览器的响应报文,判断响应报文的报文体的内容类型是否为超文本标记语言(hyper text markup language,HTML)格式;若响应报文的报文体的内容类型为HTML格式,则转换插件在响应报文的报文体中插入监听模块的代码,得到第二响应报文,并将第二响应报文发送给所述浏览器,相应地,浏览器接收第二响应报文;若响应报文的报文体的内容类型为其他格式,如纯文本格式、图片格式等,则转换插件将响应报文交还给服务器,以使服务器直接将该响应报文发送给浏览器。The conversion plug-in intercepts the response message sent by the server to the browser, and determines whether the content type of the message body of the response message is a hypertext markup language (Hyper Text Markup Language, HTML) format; if the content of the message body of the response message If the type is HTML format, the conversion plug-in inserts the code of the monitoring module into the message body of the response message, obtains the second response message, and sends the second response message to the browser. Accordingly, the browser receives the first response message. 2. Response message; if the content type of the message body of the response message is in other formats, such as plain text format, image format, etc., the conversion plug-in will return the response message to the server, so that the server can directly send the response message to the browser.

由前述分析可知,当服务器未发起302重定向时,说明是浏览器在用户未登录状态下访问其他资源或者浏览器在用户登录状态下访问受保护资源,此时,服务器直接生成报文体包括待访问资源(即用户请求的资源)的响应报文,相应地,本步骤中,第二响应报文是转换插件在包括待访问资源的响应报文的报文体中插入监听模块的代码得到的。It can be seen from the above analysis that when the server does not initiate a 302 redirection, it means that the browser accesses other resources when the user is not logged in, or the browser accesses protected resources when the user is logged in. Correspondingly, in this step, the second response message is obtained by the conversion plug-in inserting the code of the monitoring module into the message body of the response message including the resource to be accessed.

可以理解的,本步骤中的插入的监听模块的代码与发起了302重定向且请求报文的类型非Ajax请求时,插入到响应报文中的监听模块的代码相同。It can be understood that the code of the monitoring module inserted in this step is the same as the code of the monitoring module inserted into the response message when a 302 redirection is initiated and the type of the request message is not an Ajax request.

S105、浏览器对第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块。S105 , the browser processes the first response message, and determines the monitoring module corresponding to the web page currently in the open state in the browser.

本实施例中,由于转换插件只安装在服务器中,为保证转换插件也能对浏览器中相应的操作进行控制,转换插件在相应的响应报文中插入监听模块的代码,在浏览器接收第一响应报文时,浏览器通过读取和分析第一响应报文的内容,确定浏览器中当前处于打开状态的网页对应的监听模块。In this embodiment, since the conversion plug-in is only installed in the server, in order to ensure that the conversion plug-in can also control the corresponding operation in the browser, the conversion plug-in inserts the code of the monitoring module into the corresponding response message, and the browser receives the first When a response message is received, the browser determines the monitoring module corresponding to the web page currently in the open state in the browser by reading and analyzing the content of the first response message.

由于第一响应报文有两种不同情况,相应地,确定浏览器中当前处于打开状态的网页对应的监听模块,也分两种可能的情况:Since there are two different situations for the first response message, correspondingly, there are two possible situations for determining the monitoring module corresponding to the webpage that is currently open in the browser:

在一种可能的实现方式中,浏览器读取和解析第一响应报文,当确定第一响应报文的报文头中不包括认证事件属性且第一响应报文的报文体中包括监听模块的代码时,浏览器对第一响应报文的报文体中的监听模块代码进行实例化,得到浏览器中当前处于打开状态的网页对应的监听模块。In a possible implementation manner, the browser reads and parses the first response packet, when it is determined that the header of the first response packet does not include the authentication event attribute and the packet body of the first response packet includes monitoring When the code of the module is used, the browser instantiates the monitoring module code in the message body of the first response message, and obtains the monitoring module corresponding to the web page currently in the open state in the browser.

在另一种可能的实现方式中,在浏览器对第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块之前,浏览器接收了服务器发送的第二响应报文,相应地,当浏览器读取和解析第一响应报文,并确定第一响应报文的报文头中包括认证事件属性时,浏览器对第二响应报文中监听模块的代码进行实例化,得到浏览器中当前处于打开状态的网页对应的监听模块。In another possible implementation manner, before the browser processes the first response message and determines the monitoring module corresponding to the web page currently in the open state in the browser, the browser receives the second response message sent by the server , correspondingly, when the browser reads and parses the first response message, and determines that the header of the first response message includes the authentication event attribute, the browser executes an instance of the code of the monitoring module in the second response message to obtain the monitoring module corresponding to the web page currently in the open state in the browser.

S106、浏览器利用监听模块和第一响应报文,生成内嵌内联框架的登录弹窗。S106, the browser generates a login pop-up window with an inline frame by using the monitoring module and the first response message.

本步骤中,在实例化出监听模块后,浏览器利用监听模块根据第一响应报文的内容,生成内嵌iframe的登录弹窗。类似地,第一响应报文的内容不同时,生成内嵌iframe的登录弹窗方式也有所不同。In this step, after the monitoring module is instantiated, the browser uses the monitoring module to generate a login pop-up window with an embedded iframe according to the content of the first response message. Similarly, when the content of the first response message is different, the method of generating the login pop-up window with the embedded iframe is also different.

在一种可能的实现方式中,浏览器利用监听模块对第一响应报文进行处理,确定第一响应报文的报文头包括认证成功跳转属性、第一响应报文的报文体包括内嵌iframe的登录弹窗的代码,认证成功跳转属性的属性值为登录成功跳转URL,内嵌iframe的登录弹窗中iframe的网址源为302重定向地址之后,浏览器对内嵌iframe的登录弹窗的代码进行渲染,得到内嵌iframe的登录弹窗。In a possible implementation manner, the browser uses the monitoring module to process the first response message, and determines that the header of the first response message includes the authentication success jump attribute, and the message body of the first response message includes the content The code of the iframe-embedded login pop-up window, the attribute value of the authentication successful jump attribute value is the login successful jump URL, and the URL source of the iframe in the iframe-embedded login pop-up window is the 302 redirect address, the browser will respond to the embedded iframe's URL. The code of the login pop-up window is rendered, and the login pop-up window with the embedded iframe is obtained.

可以理解的是,该实现方式中,由于第一响应报文的报文体中包括内嵌iframe的登录弹窗的代码,因此,浏览器对内嵌iframe的登录弹窗的代码的进行渲染,就可以得到内嵌iframe的登录弹窗,并且该内嵌iframe的登录弹窗的iframe src为302重定向地址。It can be understood that, in this implementation manner, since the message body of the first response message includes the code of the login pop-up window embedded in the iframe, the browser renders the code of the login pop-up window embedded in the iframe. You can get the login pop-up window with the embedded iframe, and the iframe src of the login pop-up window with the embedded iframe is the 302 redirect address.

在另一种可能的实现方式中,浏览器利用监听模块对第一响应报文进行处理,确定第一响应报文的报文头包括认证事件属性和认证成功跳转属性,认证事件属性的属性值为302重定向地址,认证成功跳转属性的属性值为登录成功跳转URL之后,浏览器通过监听模块根据认证事件属性的属性值,构建所述内嵌iframe的登录弹窗,即得到内嵌iframe的登录弹窗中iframe的网址源为302重定向地址。In another possible implementation manner, the browser processes the first response packet by using the monitoring module, and determines that the packet header of the first response packet includes the authentication event attribute and the authentication successful jump attribute, and the attribute of the authentication event attribute The value is the redirect address of 302, and the attribute value of the authentication successful jump attribute is after the successful login jump URL, the browser constructs the login pop-up window of the embedded iframe according to the attribute value of the authentication event attribute through the monitoring module, that is, the content is obtained. The URL source of the iframe in the login pop-up window embedded with the iframe is the 302 redirect address.

可以理解的是,本实现方式中,由于第一响应报文中并不包括内嵌iframe的登录弹窗的代码,因此,浏览器需要利用监听模块根据第一响应报文的报文头中的内容,即认证事件属性和认证事件属性值,构建一个内嵌iframe的登录弹窗。It can be understood that, in this implementation manner, since the first response message does not include the code of the iframe-embedded login pop-up window, the browser needs to use the monitoring module to The content, that is, the authentication event attribute and the authentication event attribute value, constructs a login pop-up window with an embedded iframe.

S107、浏览器利用监听模块根据内嵌内联框架的登录弹窗中内联框架的位置属性的属性值,控制内嵌内联框架的登录弹窗执行与属性值对应的操作。S107 , the browser controls the login popup window of the inline frame to perform an operation corresponding to the property value according to the property value of the location attribute of the iframe in the login popup window of the iframe by using the monitoring module.

本步骤中,由前述分析可知,通常情况下在CAS认证机制中浏览器会进行三次跳转,由于本实施例中,通过iframe的登录弹窗对用户进行身份认证,浏览器的跳转转化为iframe的位置属性的属性值的变化,因此,本步骤中,在得到内嵌iframe的登录弹窗后,浏览器利用监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与iframe的位置属性的属性值对应的操作,从而实现在登录弹窗中完成对用户的登录认证。In this step, it can be seen from the foregoing analysis that, under normal circumstances, the browser will perform three jumps in the CAS authentication mechanism. Since in this embodiment, the user is authenticated through the login pop-up window of the iframe, and the browser’s jump is converted into The attribute value of the location attribute of the iframe changes. Therefore, in this step, after obtaining the login pop-up window embedded in the iframe, the browser controls the The login pop-up window embedded with the iframe executes the operation corresponding to the attribute value of the location attribute of the iframe, so as to complete the login authentication of the user in the login pop-up window.

本实施例中,通过服务器上安装的转换插件,在服务器接收到浏览器发送的请求报文时,判断服务器是否发起302重定向,在确定服务器发起了302重定向且产生的302重定向地址符合中心认证服务CAS的地址格式时,拦截服务器发送给浏览器的响应报文,根据请求报文的类型,对响应报文进行处理,得到第一响应报文,将第一响应报文发送给浏览器,通过终端设备上安装的浏览器,在接收到服务器发送的第一响应报文时,对第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块,利用监听模块和第一响应报文,生成内嵌iframe的登录弹窗,利用监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与属性值对应的操作,通过在服务器上安装转换插件,在不对服务器的源代码进行改动的情况下,实现了把“基于网页跳转的CAS单点登录”转换成“基于网页内嵌iframe弹窗的CAS单点登录”,通过一键安装或一键卸载,就可以实现不同服务器上转换插件的安装或卸载,操作简单,且由于转换插件不侵入源代码,节省了改造登录流程所需的成本。In this embodiment, through the conversion plug-in installed on the server, when the server receives the request message sent by the browser, it is determined whether the server initiates 302 redirection, and when it is determined that the server initiates 302 redirection and the generated 302 redirection address conforms to When the address format of the central authentication service CAS is used, intercept the response message sent by the server to the browser, process the response message according to the type of the request message, obtain the first response message, and send the first response message to the browser. The browser installed on the terminal device, when receiving the first response message sent by the server, processes the first response message, determines the monitoring module corresponding to the currently open webpage in the browser, and uses the monitoring The module and the first response message generate a login pop-up window with an embedded iframe, and use the monitoring module to control the execution of the login pop-up window embedded in the iframe corresponding to the attribute value according to the attribute value of the location attribute of the iframe in the login pop-up window with the embedded iframe. By installing the conversion plug-in on the server, without changing the source code of the server, the "CAS single sign-on based on web page jumping" is converted into "CAS single sign-on based on the embedded iframe pop-up window of the web page". "Click Login", through one-click installation or one-click uninstallation, the installation or uninstallation of conversion plug-ins on different servers can be realized. The operation is simple, and because the conversion plug-in does not invade the source code, it saves the cost of modifying the login process.

优选地,S106中在得到内嵌iframe的登录弹窗的同时,浏览器利用监听模块控制内嵌iframe的登录弹窗为隐藏状态,即不显示,用户不可见。与此同时,浏览器也可以利用监听模块在当前网页中显示正在认证的提示消息。相应地,图3为本申请实施例提供的登录形式转换方法实施例二的流程示意图,如图3所示,S107可具体通过以下步骤来实现:Preferably, in S106, while obtaining the login popup window embedded in the iframe, the browser uses the monitoring module to control the login popup window embedded in the iframe to be in a hidden state, that is, not displayed and invisible to the user. At the same time, the browser can also use the monitoring module to display an authentication prompt message in the current web page. Correspondingly, FIG. 3 is a schematic flowchart of the second embodiment of the login form conversion method provided by the embodiment of the application. As shown in FIG. 3 , S107 can be specifically implemented by the following steps:

S1071、利用监听模块判断内联框架的位置属性的属性值能否在预设时间阈值内变成登录成功跳转URL。S1071. Use the monitoring module to determine whether the attribute value of the location attribute of the inline frame can become a successful login redirect URL within a preset time threshold.

iframe的位置属性的初始属性值为iframe src,即302重定向地址,但由于浏览器的跨域限制,在iframe的位置属性的属性值变为登录成功跳转URL之前,监听模块无法读取到iframe的位置属性的具体属性值,因此,本步骤中,通过利用监听模块判断iframe的位置属性的属性值能否在预设时间阈值内变成登录成功跳转URL,就可以确定当前场景(前述中的场景一或场景二),若iframe的位置属性的属性值不能在预设时间阈值内变成登录成功跳转URL,说明统一认证中心中未存储用户的个人信息,需要用户输入个人信息才能进行认证,对应于前述场景一的情况,相应地浏览器执行S1072-S1074;若iframe的位置属性的属性值能在预设时间阈值内变成登录成功跳转URL,说明统一认证中心中存储了用户的个人信息,不需要用户再输入个人信息就可以实现认证,对应于前述场景二的情况,相应地,浏览器执行S1075-S1076。The initial attribute value of the location attribute of the iframe is iframe src, that is, the 302 redirect address. However, due to the cross-domain restriction of the browser, the monitoring module cannot read the value of the location attribute of the iframe until the successful login redirect URL. The specific attribute value of the location attribute of the iframe, therefore, in this step, the current scene can be determined by using the monitoring module to determine whether the attribute value of the location attribute of the iframe can become a successful login jump URL within the preset time threshold. Scenario 1 or Scenario 2), if the attribute value of the location attribute of the iframe cannot become the successful login redirect URL within the preset time threshold, it means that the user's personal information is not stored in the unified authentication center, and the user needs to enter the personal information. For authentication, corresponding to the situation in the aforementioned scenario 1, the browser executes S1072-S1074 accordingly; if the attribute value of the location attribute of the iframe can be changed to the successful login redirect URL within the preset time threshold, it means that the unified authentication center has stored The user's personal information can be authenticated without the user's further input of personal information. Corresponding to the situation in the foregoing scenario 2, correspondingly, the browser executes S1075-S1076.

其中,预设时间阈值可以根据实际应用时,当不需要用户输入个人信息时,浏览器从统一认证中心返回的身份认证页面跳转到登录Web服务器登录票根验证页面所需要的时间,预设时间阈值只要大于该时间即可。Among them, the preset time threshold can be based on the time required for the browser to jump from the identity authentication page returned by the unified authentication center to the login ticket stub authentication page of the web server when the user does not need to input personal information in actual applications, and the preset time The threshold value only needs to be larger than this time.

S1072、利用监听模块控制内嵌内联框架的登录弹窗显示。S1072, using the monitoring module to control the display of the login pop-up window of the inline frame.

本步骤中,在登录弹窗保持隐藏状态的前提下,当确定iframe的位置属性的属性值没有在预设时间阈值内变成登录成功跳转URL时,利用监听模块控制内嵌iframe的登录弹窗显示,以使用户可以在登录弹窗中输入个人信息。In this step, on the premise that the login pop-up window remains hidden, when it is determined that the attribute value of the location attribute of the iframe does not become a successful login redirect URL within the preset time threshold, the monitoring module is used to control the login pop-up embedded in the iframe. window is displayed so that the user can enter personal information in the login popup.

S1073、当内联框架的位置属性的属性值发生变化时,利用监听模块判断内联框架的位置属性的属性值是否等于登录成功跳转URL。S1073: When the attribute value of the location attribute of the iframe changes, use the monitoring module to determine whether the attribute value of the location attribute of the iframe is equal to the successful login redirection URL.

本步骤中,当用户输入个人信息后,iframe的位置属性的属性值发生变化,浏览器利用监听模块进一步获取iframe的位置属性,并利用第一响应报文中的认证成功跳转属性的属性值与iframe的位置属性的属性值作比较,判断iframe的位置属性的属性值是否等于登录成功跳转URL,通过判断iframe的位置属性的属性值是否等于登录成功跳转URL,可以确认用户是否输入了正确的个人信息以及登录票根验证是否通过。In this step, after the user inputs personal information, the attribute value of the location attribute of the iframe changes, the browser uses the monitoring module to further obtain the location attribute of the iframe, and uses the attribute value of the authentication success jump attribute in the first response message Compare with the attribute value of the iframe's location attribute to determine whether the attribute value of the iframe's location attribute is equal to the successful login redirect URL. By judging whether the attribute value of the iframe's location attribute is equal to the successful login redirect URL, we can confirm whether the user has entered Correct personal information and login stub verification passed.

S1074、若内联框架的位置属性的属性值等于登录成功跳转URL,则利用监听模块将登录弹窗设置为隐藏状态并控制当前网页显示认证成功提示消息。S1074 , if the attribute value of the location attribute of the iframe is equal to the successful login redirection URL, use the monitoring module to set the login popup window to a hidden state and control the current webpage to display an authentication success prompt message.

本步骤中,若iframe的位置属性的属性值等于登录成功跳转URL,说明用户个人信息及登录票根均验证通过,则浏览器利用监听模块将登录弹窗设置为隐藏状态并控制当前网页显示认证成功提示消息,以提示用户登录成功。若iframe的位置属性的属性值不等于登录成功跳转URL,说明用户个人信息或登录票根验证失败,则浏览器利用监听模块将登录弹窗设置为隐藏状态并控制当前网页显示认证失败相关的提示消息。In this step, if the attribute value of the location attribute of the iframe is equal to the successful login redirect URL, indicating that both the user's personal information and the login ticket stub are verified, the browser uses the monitoring module to set the login pop-up window to a hidden state and control the current webpage to display the authentication A success prompt message to prompt the user that the login was successful. If the attribute value of the location attribute of the iframe is not equal to the successful login redirect URL, indicating that the user's personal information or login ticket stub verification fails, the browser uses the monitoring module to set the login pop-up window to a hidden state and control the current web page to display a prompt related to authentication failure information.

S1075、当内联框架的位置属性的属性值发生变化时,利用监听模块判断内联框架的位置属性的属性值是否等于登录成功跳转URL。S1075 , when the attribute value of the location attribute of the iframe changes, use the monitoring module to determine whether the attribute value of the location attribute of the iframe is equal to the successful login redirection URL.

本步骤中,当确定iframe的位置属性的属性值能在预设时间阈值内变成登录成功跳转URL,在登录弹窗保持隐藏状态的前提下,当iframe的位置属性的属性值发生变化时,利用监听模块判断iframe的位置属性的属性值是否等于登录成功跳转URL,其具体实现方式与S1073类似,此处不再赘述。In this step, when it is determined that the attribute value of the location attribute of the iframe can become a successful login redirect URL within the preset time threshold, and on the premise that the login pop-up window remains hidden, when the attribute value of the location attribute of the iframe changes , the monitoring module is used to judge whether the attribute value of the location attribute of the iframe is equal to the successful login redirection URL.

S1076、若内联框架的位置属性的属性值等于登录成功跳转URL,则利用监听模块控制当前网页显示认证成功提示消息。S1076 , if the attribute value of the location attribute of the iframe is equal to the successful login redirection URL, use the monitoring module to control the current webpage to display the authentication success prompt message.

本步骤中,若根据S1075浏览器利用监听模块确定iframe的位置属性的属性值等于登录成功跳转URL,则利用监听模块控制当前网页显示认证成功提示消息,其具体实现与S1074类似,此处不再赘述。In this step, if according to S1075, the browser uses the monitoring module to determine that the attribute value of the location attribute of the iframe is equal to the successful login redirect URL, then the monitoring module is used to control the current webpage to display the authentication success prompt message. The specific implementation is similar to that of S1074. Repeat.

本实施例中,通过利用监听模块判断iframe的位置属性的属性值能否在预设时间阈值内变成登录成功跳转URL,若iframe的位置属性的属性值不能在预设时间阈值内变成登录成功跳转URL,浏览器利用监听模块控制内嵌iframe的登录弹窗显示,当iframe的位置属性的属性值发生变化时,利用监听模块判断iframe的位置属性的属性值是否等于登录成功跳转URL,若iframe的位置属性的属性值等于登录成功跳转URL,则利用监听模块将登录弹窗设置为隐藏状态并控制当前网页显示认证成功提示消息,若iframe的位置属性的属性值能在预设时间阈值内变成登录成功跳转URL,当iframe的位置属性的属性值发生变化时,浏览器利用监听模块判断iframe的位置属性的属性值是否等于登录成功跳转URL,若iframe的位置属性的属性值等于登录成功跳转URL,则利用监听模块控制当前网页显示认证成功提示消息,实现了不同场景下对用户的身份认证,满足了用户的不同使用需求,有利于提高用户使用体验。In this embodiment, the monitoring module is used to determine whether the attribute value of the location attribute of the iframe can become a successful login redirect URL within the preset time threshold, if the attribute value of the location attribute of the iframe cannot be changed within the preset time threshold When the login is successful, the URL is redirected. The browser uses the monitoring module to control the display of the login pop-up window embedded in the iframe. When the attribute value of the location attribute of the iframe changes, the monitoring module is used to determine whether the attribute value of the location attribute of the iframe is equal to the successful login jump. URL, if the attribute value of the location attribute of the iframe is equal to the successful login redirect URL, use the monitoring module to set the login pop-up window to a hidden state and control the current web page to display the authentication success prompt message. Set the time threshold to become the successful login redirect URL. When the attribute value of the location attribute of the iframe changes, the browser uses the monitoring module to determine whether the attribute value of the location attribute of the iframe is equal to the successful login redirect URL. If the location attribute of the iframe changes If the attribute value is equal to the successful login redirect URL, the monitoring module is used to control the current webpage to display the authentication success prompt message, which realizes the authentication of the user in different scenarios, meets the different needs of the user, and is conducive to improving the user experience.

下面将以两个具体的举例,对本申请的技术方案进行详细说明:The technical solution of the present application will be described in detail below with two specific examples:

示例一:Example one:

(1)用户在未登录状态下访问某Web应用的个人中心页面(该页面为不需要登录就可以访问的页面),浏览器向服务器发送请求报文,转换插件判断服务器是否发起302重定向,当服务器未发起302重定向时,转换插件拦截服务器将要返回给浏览器的响应报文,当确定该响应报文的报文体的内容类型为HTML格式时,转换插件在该响应报文中插入监听模块代码,得到第二响应报文,并将第二响应报文发送给浏览器;(1) When the user accesses the personal center page of a web application in the unlogged state (this page is a page that can be accessed without logging in), the browser sends a request message to the server, and the conversion plug-in determines whether the server initiates 302 redirection, When the server does not initiate 302 redirection, the conversion plug-in intercepts the response message that the server will return to the browser, and when it is determined that the content type of the message body of the response message is HTML format, the conversion plug-in inserts a listener into the response message The module code obtains the second response message, and sends the second response message to the browser;

(2)用户非登录状态下在浏览器显示的个人中心页面下又点击查询个人信息按钮(用户需登录后才有权限访问)时,浏览器以Ajax形式向服务器发送请求报文;转换插件监测到服务器接收到该请求报文时触发了302重定向且产生的302重定向地址符合CAS的地址格式,转换插件拦截服务器将要发送给浏览器的响应报文,将该响应报文的报文头中的超文本传输协议HTTP状态码修改为200,并在其报文头中增加认证事件属性和认证成功跳转属性,认证事件属性的属性值为所述302重定向地址,认证成功跳转属性的属性值为所述服务器中存储的登录成功跳转URL,得到第一响应报文,并将第一响应报文发送给浏览器。(2) When the user clicks the Query Personal Information button under the personal center page displayed by the browser in the non-login state (the user needs to log in to have access), the browser sends a request message to the server in the form of Ajax; the conversion plug-in monitors When the server receives the request message, a 302 redirect is triggered and the generated 302 redirect address conforms to the CAS address format. The conversion plug-in intercepts the response message that the server will send to the browser, and the header of the response message The hypertext transfer protocol HTTP status code in is modified to 200, and the authentication event attribute and the authentication success jump attribute are added in its message header. The attribute value of the authentication event attribute is the 302 redirection address, and the authentication success jump attribute The attribute value of is the successful login redirect URL stored in the server, the first response message is obtained, and the first response message is sent to the browser.

(3)浏览器接收到第一响应报文之后,判断出其报文头中包括认证事件属性,浏览器对第二响应报文中的监听模块的代码进行实例化,得到监听模块;(3) After the browser receives the first response message, it is judged that the message header includes the authentication event attribute, and the browser instantiates the code of the monitoring module in the second response message to obtain the monitoring module;

(4)监听模块根据认证事件属性的属性值,构建内嵌iframe的登录弹窗,登录弹窗中iframe src为302重定向地址;(4) According to the attribute value of the authentication event attribute, the monitoring module constructs a login pop-up window with an embedded iframe, and the iframe src in the login pop-up window is the 302 redirection address;

(5)监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与属性值对应的操作,通过登录弹窗完成对用户的登录认证。(5) The monitoring module controls the iframe-embedded login pop-up window to perform operations corresponding to the attribute values according to the attribute value of the location attribute of the iframe in the iframe-embedded login pop-up window, and completes the user's login authentication through the login pop-up window.

(6)用户重新点击查询个人信息按钮,即可查看个人信息。(6) The user can view the personal information by clicking the Query Personal Information button again.

示例二:Example two:

(1)用户非登录状态下访问某Web应用的个人基本资料页面(用户需登录后才有权限访问),浏览器以非Ajax形式向服务器发送请求报文;转换插件监测到服务器接收到该请求报文时触发了302重定向且产生的302重定向地址符合CAS的地址格式,转换插件拦截服务器将要发送给浏览器的响应报文,将该响应报文的报文头中的超文本传输协议HTTP状态码修改为200,并在响应报文的报文头中增加认证成功跳转属性,认证成功跳转属性的属性值为服务器中存储的登录成功跳转URL,为响应报文填充报文体,报文体包括内嵌iframe的登录弹窗的代码和监听模块的代码,内嵌iframe的登录弹窗中iframe的网址源为302重定向地址,得到第一响应报文,并将第一响应报文发送给浏览器。(1) When the user accesses the personal basic information page of a Web application in a non-login state (the user needs to log in to have permission to access), the browser sends a request message to the server in a non-Ajax form; the conversion plug-in detects that the server receives the request When a 302 redirect is triggered in the message and the generated 302 redirect address conforms to the CAS address format, the conversion plug-in intercepts the response message that the server will send to the browser, and the hypertext transfer protocol in the header of the response message The HTTP status code is changed to 200, and the authentication success redirect attribute is added to the header of the response message. The attribute value of the authentication success redirect property is the login success redirect URL stored in the server, and the message body is filled in the response message. , the message body includes the code of the iframe-embedded login pop-up window and the code of the monitoring module, the URL source of the iframe in the iframe-embedded login pop-up window is the 302 redirect address, the first response message is obtained, and the first response is reported to text to the browser.

(2)浏览器接收到第一响应报文之后,判断出其报文头中不包括认证事件属性且报文体中包括监听模块的代码,浏览器对第一响应报文中的监听模块的代码进行实例化,得到监听模块。(2) After the browser receives the first response message, it judges that the header of the message does not include the authentication event attribute and the message body includes the code of the monitoring module, and the browser has the code of the monitoring module in the first response message. Instantiate to get the monitor module.

(3)浏览器对内嵌iframe的登录弹窗的代码进行渲染,得到内嵌iframe的登录弹窗,登录弹窗中iframe src为302重定向地址。(3) The browser renders the code of the login pop-up window with the embedded iframe, and obtains the login pop-up window with the embedded iframe. The iframe src in the login pop-up window is the 302 redirect address.

(4)监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与属性值对应的操作,通过登录弹窗完成对用户的登录认证。(4) The monitoring module controls the iframe-embedded login pop-up window to perform operations corresponding to the attribute values according to the attribute value of the location attribute of the iframe in the iframe-embedded login pop-up window, and completes the user's login authentication through the login pop-up window.

(5)用户执行点击查看个人基本资料页面,浏览器跳转到个人基本资料页面。(5) The user clicks to view the personal basic information page, and the browser jumps to the personal basic information page.

图4为本申请实施例提供的登录形式转换装置实施例一的结构示意图,如图1所示,登录形式转换装置10包括:FIG. 4 is a schematic structural diagram of Embodiment 1 of the login form conversion apparatus provided by the embodiment of the present application. As shown in FIG. 1 , the login form conversion apparatus 10 includes:

处理单元11和收发单元12。Processing unit 11 and transceiver unit 12 .

其中,处理单元11用于在服务器接收到浏览器发送的请求报文时,判断服务器是否发起302重定向;在确定服务器发起了302重定向且产生的302重定向地址符合中心认证服务CAS的地址格式时,拦截服务器发送给所述浏览器的响应报文;根据请求报文的类型,对响应报文进行处理,得到第一响应报文;Wherein, the processing unit 11 is used to determine whether the server initiates 302 redirection when the server receives the request message sent by the browser; when it is determined that the server initiates 302 redirection and the generated 302 redirection address conforms to the address of the central authentication service CAS Format, intercept the response message sent by the server to the browser; process the response message according to the type of the request message to obtain the first response message;

收发单元12用于将第一响应报文发送给浏览器。The transceiver unit 12 is configured to send the first response message to the browser.

可选地,处理单元11具体用于:Optionally, the processing unit 11 is specifically configured to:

若请求报文的类型为异步JavaScript和可扩展标记语言Ajax请求,将响应报文的报文头中的超文本传输协议HTTP状态码修改为200;在响应报文的报文头中增加认证事件属性和认证成功跳转属性,认证事件属性的属性值为所述302重定向地址,认证成功跳转属性的属性值为所述服务器中存储的登录成功跳转统一资源定位符URL。If the type of the request message is an asynchronous JavaScript and extensible markup language Ajax request, change the HTTP status code of the Hypertext Transfer Protocol in the header of the response message to 200; add an authentication event to the header of the response message attribute and authentication success jump attribute, the attribute value of the authentication event attribute is the 302 redirection address, and the attribute value of the authentication success jump attribute is the login successful jump uniform resource locator URL stored in the server.

可选地,处理单元11具体用于:Optionally, the processing unit 11 is specifically configured to:

若请求报文的类型为非异步JavaScript和可扩展标记语言Ajax请求,将响应报文的报文头中的超文本传输协议HTTP状态码修改为200;在响应报文的报文头中增加认证成功跳转属性,认证成功跳转属性的属性值为服务器中存储的登录成功跳转统一资源定位符URL;为响应报文填充报文体,报文体包括内嵌iframe的登录弹窗的代码和监听模块的代码,内嵌iframe的登录弹窗中iframe的网址源为302重定向地址。If the type of the request message is a non-asynchronous JavaScript and Extensible Markup Language Ajax request, change the HTTP status code of the Hypertext Transfer Protocol in the header of the response message to 200; add authentication to the header of the response message Successful jump attribute, the attribute value of the authentication successful jump attribute is the URL of the login successful jump uniform resource locator stored in the server; the message body is filled for the response message, and the message body includes the code and monitoring of the login pop-up window embedded in the iframe. The code of the module, the URL source of the iframe in the login pop-up window with the embedded iframe is the 302 redirect address.

可选地,处理单元11还用于:Optionally, the processing unit 11 is also used for:

若确定服务器未发起302重定向,则拦截服务器发送给浏览器的响应报文;判断响应报文的报文体的内容类型是否为超文本标记语言HTML格式;若响应报文的报文体的内容类型为HTML格式,则在响应报文的报文体中插入监听模块的代码,得到第二响应报文。If it is determined that the server does not initiate 302 redirection, intercept the response message sent by the server to the browser; determine whether the content type of the message body of the response message is HTML format; if the content type of the message body of the response message If it is in HTML format, insert the code of the monitoring module into the message body of the response message to obtain the second response message.

收到单元12还用于:The receiving unit 12 is also used to:

将第二响应报文发送给浏览器。Send the second response message to the browser.

本实施提供的登录形式转换装置10,用于执行前述任一方法实施例中服务器侧的技术方案,实现原理和技术效果类似,在此不再赘述。The login form conversion apparatus 10 provided in this embodiment is configured to execute the technical solution on the server side in any of the foregoing method embodiments, and the implementation principles and technical effects are similar, and details are not described herein again.

图5为本申请实施例提供的登录形式转换装置实施例二的结构示意图,如图5所示,本实施例中的登录形式转换装置20包括:FIG. 5 is a schematic structural diagram of Embodiment 2 of the login form conversion apparatus provided by the embodiment of the application. As shown in FIG. 5 , the login form conversion apparatus 20 in this embodiment includes:

收发单元21和处理单元22。Transceiver unit 21 and processing unit 22 .

其中,收发单元21用于接收服务器发送的第一响应报文。The transceiver unit 21 is configured to receive the first response message sent by the server.

处理单元22用于对第一响应报文进行处理,确定浏览器中当前处于打开状态的网页对应的监听模块,利用监听模块和第一响应报文,生成内嵌iframe的登录弹窗,利用监听模块根据内嵌iframe的登录弹窗中iframe的位置属性的属性值,控制内嵌iframe的登录弹窗执行与属性值对应的操作。The processing unit 22 is used to process the first response message, determine the monitoring module corresponding to the webpage currently in the open state in the browser, use the monitoring module and the first response message to generate a login pop-up window with an embedded iframe, and use the monitoring module and the first response message to generate a login pop-up window with an embedded iframe. The module controls the iframe-embedded login pop-up window to perform operations corresponding to the attribute values according to the attribute value of the location attribute of the iframe in the iframe-embedded login pop-up window.

可选地,处理单元22具体用于:Optionally, the processing unit 22 is specifically configured to:

利用监听模块对第一响应报文进行处理,确定第一响应报文的报文头包括认证成功跳转属性、第一响应报文的报文体包括内嵌iframe的登录弹窗的代码,认证成功跳转属性的属性值为登录成功跳转统一资源定位符URL,内嵌iframe的登录弹窗中iframe的网址源为302重定向地址;对内嵌iframe的登录弹窗的代码进行渲染,得到内嵌iframe的登录弹窗。The monitoring module is used to process the first response message, and it is determined that the header of the first response message includes the authentication success jump attribute, and the message body of the first response message includes the code of the login pop-up window embedded in the iframe, and the authentication is successful. The attribute value of the jump attribute is the URL of the URL of the login successfully jumped to, and the URL source of the iframe in the login pop-up window embedded with the iframe is the 302 redirect address; Login popup with embedded iframe.

可选地,处理单元22具体用于:Optionally, the processing unit 22 is specifically configured to:

利用监听模块对第一响应报文进行处理,确定第一响应报文的报文头包括认证事件属性和认证成功跳转属性,认证事件属性的属性值为302重定向地址,认证成功跳转属性的属性值为登录成功跳转统一资源定位符URL;通过监听模块根据认证事件属性的属性值,构建内嵌iframe的登录弹窗。Use the monitoring module to process the first response packet, and determine that the packet header of the first response packet includes the authentication event attribute and the authentication successful jump attribute, the attribute value of the authentication event attribute is 302 redirection address, and the authentication successful jump attribute The value of the attribute value is the URL of the Uniform Resource Locator that is successfully logged in; the monitoring module constructs the login pop-up window with the embedded iframe according to the attribute value of the authentication event attribute.

可选地,收发单元21还用于:Optionally, the transceiver unit 21 is also used for:

接收服务器发送的第二响应报文,第二响应报文的报文体包括监听模块的代码。The second response message sent by the server is received, and the message body of the second response message includes the code of the monitoring module.

相应地,处理单元22具体用于:Correspondingly, the processing unit 22 is specifically used for:

对第一响应报文进行处理,确定第一响应报文的报文头中包括认证事件属性,对第二响应报文的报文体中监听模块的代码进行实例化,得到浏览器中当前处于打开状态的网页对应的监听模块。Process the first response message, determine that the header of the first response message includes the authentication event attribute, instantiate the code of the monitoring module in the message body of the second response message, and obtain the browser that is currently open The monitoring module corresponding to the web page of the status.

可选地,处理单元22具体用于:Optionally, the processing unit 22 is specifically configured to:

对第一响应报文进行处理,确定第一响应报文的报文头中不包括认证事件属性且第一响应报文的报文体中包括监听模块的代码,对第一响应报文的报文体中监听模块的代码进行实例化,得到浏览器中当前处于打开状态的网页对应的监听模块。Process the first response message, determine that the header of the first response message does not include the authentication event attribute and the message body of the first response message includes the code of the monitoring module, and the message body of the first response message The code of the monitoring module in the browser is instantiated to obtain the monitoring module corresponding to the currently open web page in the browser.

可选的,处理单元22还用于:Optionally, the processing unit 22 is also used for:

利用监听模块控制内嵌iframe的登录弹窗为隐藏状态。Use the monitoring module to control the login pop-up window embedded in the iframe to be hidden.

相应地,处理单元22具体用于:Correspondingly, the processing unit 22 is specifically used for:

利用监听模块判断iframe的位置属性的属性值能否在预设时间阈值内变成登录成功跳转URL;Use the monitoring module to determine whether the attribute value of the location attribute of the iframe can become a successful login jump URL within the preset time threshold;

若iframe的位置属性的属性值不能在预设时间阈值内变成登录成功跳转URL,利用监听模块控制登录弹窗显示;If the attribute value of the location attribute of the iframe cannot be changed to the successful login redirect URL within the preset time threshold, the monitoring module is used to control the display of the login pop-up window;

当iframe的位置属性的属性值发生变化时,利用监听模块判断iframe的位置属性的属性值是否等于登录成功跳转URL;When the attribute value of the location attribute of the iframe changes, the monitoring module is used to judge whether the attribute value of the location attribute of the iframe is equal to the successful login redirect URL;

若iframe的位置属性的属性值等于登录成功跳转URL,则利用监听模块将登录弹窗设置为隐藏状态并控制当前网页显示认证成功提示消息。If the attribute value of the location attribute of the iframe is equal to the successful login redirect URL, the monitoring module is used to set the login popup window to a hidden state and control the current web page to display a successful authentication prompt message.

可选地,处理单元22还用于:Optionally, the processing unit 22 is also used for:

若iframe的位置属性的属性值能在预设时间阈值内变成登录成功跳转URL,则当iframe的位置属性的属性值发生变化时,利用监听模块判断iframe的位置属性的属性值是否等于登录成功跳转URL;If the attribute value of the location attribute of the iframe can become a successful login redirect URL within the preset time threshold, when the attribute value of the location attribute of the iframe changes, the monitoring module is used to judge whether the attribute value of the location attribute of the iframe is equal to the login Successfully redirected URL;

若iframe的位置属性的属性值登录成功跳转URL,则利用监听模块控制当前网页显示认证成功提示消息。If the attribute value of the location attribute of the iframe is successfully logged in and redirects to the URL, the monitoring module is used to control the current webpage to display a prompt message of successful authentication.

本实施提供的登录形式转换装置20,用于执行前述任一方法实施例中终端设备侧的技术方案,实现原理和技术效果类似,在此不再赘述。The login form conversion apparatus 20 provided in this embodiment is configured to execute the technical solutions on the terminal device side in any of the foregoing method embodiments, and the implementation principles and technical effects are similar, and details are not described herein again.

图6为本申请提供的服务器实施例的结构示意图,如图6所示,本实施例中的服务器30包括:收发器30、存储器32和处理器33,存储器32用于存储计算机程序,处理器33执行计算机程序实现前述服务器侧的任一方法实施例中的登录形式转换方法。FIG. 6 is a schematic structural diagram of an embodiment of a server provided by this application. As shown in FIG. 6 , the server 30 in this embodiment includes: a transceiver 30, a memory 32, and a processor 33. The memory 32 is used to store computer programs, and the processor 33. Execute the computer program to implement the login form conversion method in any of the foregoing server-side method embodiments.

图7为本申请提供的终端设备实施例的结构示意图,如图7所示,本实施例中的终端设备40包括:收发器41、存储器42和处理器43,存储器42用于存储计算机程序,处理器43执行计算机程序实现前述终端设备侧的任一方法实施例中的登录形式转换方法。FIG. 7 is a schematic structural diagram of an embodiment of a terminal device provided by the application. As shown in FIG. 7 , the terminal device 40 in this embodiment includes: a transceiver 41, a memory 42, and a processor 43, and the memory 42 is used for storing computer programs, The processor 43 executes the computer program to implement the login form conversion method in any of the foregoing method embodiments on the terminal device side.

本申请实施例还提供一种存储介质,该存储介质用于存储计算机程序,存储的计算机程序用于实现上述任一方法实施例提供的服务器侧的登录形式转换方法。An embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program, and the stored computer program is used to implement the server-side login form conversion method provided by any of the above method embodiments.

本申请实施例还提供一种存储介质,该存储介质用于存储计算机程序,存储的计算机程序用于实现上述任一方法实施例提供的终端设备的侧登录形式转换方法。An embodiment of the present application further provides a storage medium, where the storage medium is used to store a computer program, and the stored computer program is used to implement the method for converting a side login form of a terminal device provided by any of the above method embodiments.

在上述的终端设备或者服务器的具体实现中,应理解,处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digitalsignal processor,DSP)、专用集成电路(application specific integrated circuit,简称:ASIC)等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。In the specific implementation of the above-mentioned terminal device or server, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), special-purpose processors, etc. Integrated circuit (application specific integrated circuit, referred to as: ASIC) and so on. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps in combination with the method disclosed in the present application can be directly embodied as executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.

本领域技术人员可以理解,上述任一方法实施例的全部或部分步骤可以通过与程序指令相关的硬件来完成。前述的程序可以存储于计算机可读取存储介质中,该程序被执行时,执行前述方法实施例所述的全部或部分的步骤。Those skilled in the art can understand that all or part of the steps of any of the above method embodiments may be completed by hardware related to program instructions. The foregoing program may be stored in a computer-readable storage medium, and when the program is executed, all or part of the steps described in the foregoing method embodiments are executed.

上述存储介质的具体实现中,可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(static random-access memory,SRAM)、电可擦除可编程只读存储器(electrically-erasable programmable read-only memory,EEPROM)、可擦除可编程只读存储器(erasable programmable read-only memory,EPROM)、可编程只读存储器(programmable read-only memory,PROM)、只读存储器(read-onlymemory,ROM)、磁存储器、快闪存储器、磁盘或光盘等。可读存储介质可以是通用或专用的计算机或类似基站能够存取的任何可用介质。In the specific implementation of the above-mentioned storage medium, it can be implemented by any type of volatile or non-volatile storage device or their combination, such as static random-access memory (SRAM), electrically erasable and removable storage medium. Programmable read-only memory (electrically-erasable programmable read-only memory, EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (programmable read-only memory, PROM) , read-only memory (read-only memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk, etc. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer or similar base station.

最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. scope.

Claims (17)

1. A login form conversion method is characterized in that the method is applied to a conversion plug-in installed on a server; the method comprises the following steps:
when a server receives a request message sent by a browser, judging whether the server initiates 302 redirection;
intercepting a response message sent to the browser by the server when the server initiates 302 redirection and the generated 302 redirection address conforms to the address format of a CAS (central authentication service);
processing the response message according to the type of the request message to obtain a first response message;
and sending the first response message to a browser.
2. The method according to claim 1, wherein the processing the response packet according to the type of the request packet to obtain a first response packet comprises:
if the type of the request message is asynchronous JavaScript and an extensible markup language (Ajax) request, modifying a hypertext transfer protocol (HTTP) state code in a message header of the response message into 200;
and adding an authentication event attribute and an authentication success skip attribute in a message header of the response message, wherein the attribute value of the authentication event attribute is the 302 redirection address, and the attribute value of the authentication success skip attribute is a login success skip Uniform Resource Locator (URL) stored in the server.
3. The method according to claim 1, wherein the processing the response packet according to the type of the request packet to obtain a first response packet comprises:
if the type of the request message is non-asynchronous JavaScript and an extensible markup language (Ajax) request, modifying a hypertext transfer protocol (HTTP) state code in a message header of the response message into 200;
adding an authentication success skip attribute in a message header of the response message, wherein the attribute value of the authentication success skip attribute is a login success skip Uniform Resource Locator (URL) stored in the server;
and filling a message body for the response message, wherein the message body comprises a code of a login popup window embedded with an inline frame iframe and a code of a monitoring module, and the website source of the iframe in the login popup window embedded with the iframe is the 302 redirection address.
4. The method of claim 1, further comprising:
if the server does not initiate 302 redirection, intercepting a response message sent by the server to the browser;
judging whether the content type of the message body of the response message is in a hypertext markup language (HTML) format or not;
if the content type of the message body of the response message is in an HTML format, inserting a code of a monitoring module into the message body of the response message to obtain a second response message;
and sending the second response message to the browser.
5. A login form conversion method is applied to a browser of a terminal device, and comprises the following steps:
receiving a first response message sent by a server;
processing the first response message, and determining a monitoring module corresponding to a webpage currently in an open state in the browser;
generating a login popup window embedded with an inline frame iframe by using the monitoring module and the first response message;
and controlling the login popup window with the embedded iframe to execute the operation corresponding to the attribute value by using the monitoring module according to the attribute value of the position attribute of the iframe in the login popup window with the embedded iframe.
6. The method of claim 5, wherein the generating a login popup window with an embedded iframe by using the listening module and the first response packet comprises:
processing the first response message by using the monitoring module, and determining that a message header of the first response message comprises an authentication success skip attribute, a message body of the first response message comprises a code of a login popup window embedded with an iframe, wherein an attribute value of the authentication success skip attribute is a login success skip Uniform Resource Locator (URL), and a website source of the iframe in the login popup window embedded with the iframe is a 302 redirection address;
and rendering the code of the login popup window embedded with the iframe to obtain the login popup window embedded with the iframe.
7. The method of claim 5, wherein the generating a login popup window with an embedded iframe by using the listening module and the first response packet comprises:
processing the first response message by using the monitoring module, and determining that a message header of the first response message comprises an authentication event attribute and an authentication success skip attribute, wherein the attribute value of the authentication event attribute is a 302 redirection address, and the attribute value of the authentication success skip attribute is a login success skip Uniform Resource Locator (URL);
and constructing a login popup window of the embedded iframe according to the attribute value of the authentication event attribute through the monitoring module.
8. The method according to claim 7, wherein before the processing the first response packet and determining the monitoring module corresponding to the currently open webpage in the browser, the method further comprises:
receiving a second response message sent by the server, wherein the message body of the second response message comprises a code of the monitoring module;
correspondingly, the processing the first response packet and determining the monitoring module corresponding to the currently open webpage in the browser includes:
processing the first response message, and determining that a message header of the first response message comprises an authentication event attribute;
and instantiating the code of the monitoring module in the message body of the second response message to obtain the monitoring module corresponding to the webpage currently in the open state in the browser.
9. The method according to claim 6, wherein the processing the first response packet and determining the monitoring module corresponding to the currently open webpage in the browser comprises:
processing the first response message, and determining that the message header of the first response message does not include the authentication event attribute and the message body of the first response message includes the code of the monitoring module;
and instantiating codes of the monitoring module in the message body of the first response message to obtain the monitoring module corresponding to the webpage currently in the open state in the browser.
10. The method according to any one of claims 6 to 9, wherein before the monitoring module is used to control the login popup window of the iframe to execute the operation corresponding to the attribute value according to the attribute value of the location attribute of the iframe in the login popup window of the iframe, the method further includes:
controlling the login popup window with the embedded iframe to be in a hidden state by using a monitoring module;
correspondingly, the controlling, by using the monitoring module, the login popup window of the embedded iframe to execute the operation corresponding to the attribute value according to the attribute value of the location attribute of the iframe in the login popup window of the embedded iframe includes:
judging whether the attribute value of the location attribute of the iframe can become a login success jump URL within a preset time threshold value by using the monitoring module;
if the attribute value of the location attribute of the iframe cannot become a login success jump URL within a preset time threshold, controlling the login popup window to display by using the monitoring module;
when the attribute value of the location attribute of the iframe changes, judging whether the attribute value of the location attribute of the iframe is equal to the login success jump URL or not by using the monitoring module;
and if the attribute value of the location attribute of the iframe is equal to the login success jump URL, setting the login popup window to be in a hidden state by using the monitoring module and controlling the current webpage to display an authentication success prompt message.
11. The method of claim 10, further comprising:
if the attribute value of the location attribute of the iframe can become a login success jump URL within a preset time threshold, judging whether the attribute value of the location attribute of the iframe is equal to the login success jump URL or not by using the monitoring module when the attribute value of the location attribute of the iframe changes;
and if the login success skip URL is the attribute value of the location attribute of the iframe, controlling the current webpage to display a prompt message of authentication success by using the monitoring module.
12. A login form conversion apparatus, comprising:
the processing unit is used for judging whether the server initiates 302 redirection when the server receives a request message sent by a browser; intercepting a response message sent to the browser by the server when the server initiates 302 redirection and the generated 302 redirection address conforms to the address format of a CAS (central authentication service); processing the response message according to the type of the request message to obtain a first response message;
and the receiving and sending unit is used for sending the first response message to the browser.
13. A login form conversion apparatus, comprising:
the receiving and sending unit is used for receiving a first response message sent by the server;
the processing unit is used for processing the first response message and determining a monitoring module corresponding to a webpage currently in an open state in a browser; generating a login popup window embedded with an inline frame iframe by using the monitoring module and the first response message; and controlling the login popup window with the embedded iframe to execute the operation corresponding to the attribute value by using the monitoring module according to the attribute value of the position attribute of the iframe in the login popup window with the embedded iframe.
14. A server, comprising: a transceiver, a memory, and a processor; the memory is used for storing a computer program, and the processor executes the computer program to realize the login form conversion method of any one of claims 1 to 4.
15. A terminal device, comprising: a transceiver, a memory, and a processor; the memory is used for storing a computer program, and the processor executes the computer program to realize the login form conversion method according to any one of claims 5 to 11.
16. A storage medium characterized in that the storage medium is used for storing a computer program for implementing the login form conversion method according to any one of claims 1 to 4.
17. A storage medium characterized in that the storage medium is used for storing a computer program for implementing the login form conversion method according to any one of claims 5 to 11.
CN202010952858.3A 2020-09-11 2020-09-11 Login form conversion method, device, storage medium and electronic device Active CN112104641B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010952858.3A CN112104641B (en) 2020-09-11 2020-09-11 Login form conversion method, device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010952858.3A CN112104641B (en) 2020-09-11 2020-09-11 Login form conversion method, device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112104641A true CN112104641A (en) 2020-12-18
CN112104641B CN112104641B (en) 2022-07-29

Family

ID=73751416

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010952858.3A Active CN112104641B (en) 2020-09-11 2020-09-11 Login form conversion method, device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112104641B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689017A (en) * 2020-12-28 2021-04-20 咪咕文化科技有限公司 Redirection processing method and device, electronic equipment and storage medium
CN113312576A (en) * 2021-05-31 2021-08-27 深圳前海微众银行股份有限公司 Page jump method, system and device
CN115664761A (en) * 2022-10-19 2023-01-31 恒生电子股份有限公司 Single sign-on method and device, electronic equipment and readable storage medium
CN115720143A (en) * 2021-08-23 2023-02-28 北京神州泰岳软件股份有限公司 Authentication method, device, electronic device, and computer-readable storage medium
CN115913780A (en) * 2022-12-28 2023-04-04 四川长虹电器股份有限公司 A method for Android TV to perform WIFI authentication without a browser

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012058896A1 (en) * 2010-11-04 2012-05-10 中兴通讯股份有限公司 Method and system for single sign-on
CN104519560A (en) * 2014-12-10 2015-04-15 广东欧珀移动通信有限公司 Mobile terminal request intercepting method and mobile terminal
CN105592026A (en) * 2014-11-14 2016-05-18 国家电网公司 Multi-network-segment multi-system single sign on method
CN106685998A (en) * 2017-02-24 2017-05-17 浙江仟和网络科技有限公司 A SSO authentication method based on CAS unified authentication service middleware
CN107070880A (en) * 2017-02-16 2017-08-18 济南浪潮高新科技投资发展有限公司 A kind of method and system of single-sign-on, a kind of authentication center's server
US20180026964A1 (en) * 2016-07-25 2018-01-25 Okta, Inc. Login proxy for third-party applications
CN107786552A (en) * 2017-10-19 2018-03-09 用友网络科技股份有限公司 Single-point logging method, system and computer equipment
CN109543376A (en) * 2018-11-30 2019-03-29 高新兴科技集团股份有限公司 Debarkation authentication method, computer storage medium and electronic equipment
CN109862047A (en) * 2019-04-18 2019-06-07 首约科技(北京)有限公司 The method, apparatus and storage medium of login service device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012058896A1 (en) * 2010-11-04 2012-05-10 中兴通讯股份有限公司 Method and system for single sign-on
CN105592026A (en) * 2014-11-14 2016-05-18 国家电网公司 Multi-network-segment multi-system single sign on method
CN104519560A (en) * 2014-12-10 2015-04-15 广东欧珀移动通信有限公司 Mobile terminal request intercepting method and mobile terminal
US20180026964A1 (en) * 2016-07-25 2018-01-25 Okta, Inc. Login proxy for third-party applications
CN107070880A (en) * 2017-02-16 2017-08-18 济南浪潮高新科技投资发展有限公司 A kind of method and system of single-sign-on, a kind of authentication center's server
CN106685998A (en) * 2017-02-24 2017-05-17 浙江仟和网络科技有限公司 A SSO authentication method based on CAS unified authentication service middleware
CN107786552A (en) * 2017-10-19 2018-03-09 用友网络科技股份有限公司 Single-point logging method, system and computer equipment
CN109543376A (en) * 2018-11-30 2019-03-29 高新兴科技集团股份有限公司 Debarkation authentication method, computer storage medium and electronic equipment
CN109862047A (en) * 2019-04-18 2019-06-07 首约科技(北京)有限公司 The method, apparatus and storage medium of login service device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689017A (en) * 2020-12-28 2021-04-20 咪咕文化科技有限公司 Redirection processing method and device, electronic equipment and storage medium
CN113312576A (en) * 2021-05-31 2021-08-27 深圳前海微众银行股份有限公司 Page jump method, system and device
CN115720143A (en) * 2021-08-23 2023-02-28 北京神州泰岳软件股份有限公司 Authentication method, device, electronic device, and computer-readable storage medium
CN115664761A (en) * 2022-10-19 2023-01-31 恒生电子股份有限公司 Single sign-on method and device, electronic equipment and readable storage medium
CN115913780A (en) * 2022-12-28 2023-04-04 四川长虹电器股份有限公司 A method for Android TV to perform WIFI authentication without a browser

Also Published As

Publication number Publication date
CN112104641B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN112104641B (en) Login form conversion method, device, storage medium and electronic device
CN111628965B (en) Cross-domain name login method and device
US6594697B1 (en) Client system having error page analysis and replacement capabilities
US7472171B2 (en) Method and system for determining receipt of a delayed cookie in a client-server architecture
US8959336B1 (en) Securing locally stored web-based database data
US11799841B2 (en) Providing intercommunication within a system that uses disparate authentication technologies
US8555351B2 (en) Trusted database authentication through an untrusted intermediary
US8544067B2 (en) System and method for authenticating web users
US9684628B2 (en) Mechanism for inserting trustworthy parameters into AJAX via server-side proxy
US9305174B2 (en) Electronic clipboard protection
CN107436873B (en) Web site jumping method, device and relay device
US8880993B2 (en) Handling unexpected responses to script executing in client-side application
US8448260B1 (en) Electronic clipboard protection
CN102624737A (en) Single sign-on integration method for Form identity authentication in single sign-on system
CN108200040A (en) Mobile client exempts from method, system, browser and the mobile terminal of close login
CN103036871A (en) Support device and method of application plug-in of browser
US8381269B2 (en) System architecture and method for secure web browsing using public computers
CA2437273C (en) Network conduit for providing access to data services
US20150127771A1 (en) Method and Apparatus
US10230768B2 (en) Generating network pages using customer-generated network page portions
CN112202813B (en) Network access method and device
US11240225B1 (en) Single sign-on techniques
WO2007068717A1 (en) Method and system for externalizing http security message handling with macro support
US8775559B1 (en) Generating network pages using customer-supplied generation code
US11750684B2 (en) Restore URL context for proxies

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
GR01 Patent grant
GR01 Patent grant