Method and device for realizing login based on IPV4 and IPV6

By configuring the interceptor group and preset address configuration items in the authentication system, and modifying the IP address of the authentication system to match the user's IPV4 or IPV6 protocol, the problem that the existing system only supports IPV4 is solved, and the IPV4 and IPV6 protocols are implemented. Compatibility and smooth access to user login.

CN118540084APending Publication Date: 2024-08-23ULTRAPOWER SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310186651.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing authentication system only supports the IPV4 protocol and cannot effectively support the IPV6 protocol, resulting in low applicability of user login authentication in complex network environments.

Method used

By pre-configuring the source code in the authentication system, using the interceptor group to intercept login requests, determining the destination IP address, and modifying the current IP address of the authentication system according to the preset address configuration items to make it consistent with the protocol type of the destination IP address, thereby supporting Authentication login for IPV4 and IPV6 protocols.

Benefits of technology

It realizes the compatibility of the authentication system with IPV4 and IPV6 protocols, reduces the workload of modifying the source code, improves efficiency, and ensures that users can smoothly access the application system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540084A
    Figure CN118540084A
Patent Text Reader

Abstract

The invention provides a method and a device for realizing login based on IPV4 and IPV6, electronic equipment and a computer readable storage medium. The method comprises the following steps: judging whether an authentication system needs to start to support simultaneous access of the IPV4 and the IPV6 or not; when the authentication system needs to start to support simultaneous access of the IPV4 and the IPV6, loading a pre-configured source code; wherein the source code comprises a preset address configuration item; when a client side sends a login request to the application system, the login request is intercepted through the interceptor group, and a destination IP address is determined from the login request; the current IP address of the authentication system is modified according to the target IP address and a preset address configuration item, so that the protocol type of the modified current IP address of the authentication system is consistent with that of the target IP address; and receiving a login request, and performing login authentication on the client. The method is used for realizing that an authentication system can simultaneously support IPV4 and IPV6 to perform authentication login.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communications, and in particular to a method, device, electronic device and computer-readable storage medium for implementing login based on IPv4 and IPv6. Background Art

[0002] With the continuous development of network communication, in order to improve security, users often need to log in through authentication when accessing application systems. When performing authentication login, users need to first access the authentication system for authentication login. Only after the authentication login is passed can users access the application system.

[0003] As the network environment for application system deployment becomes more and more complex, the network protocol migrates from IPV4 to IPV6. For the same user's client or application system, multiple IP addresses will be deployed. For example, an application system is configured with both an IPV4 address and an IPV6 address, and the user's client is also configured with an IPV4 address and an IPV6 address. However, the existing authentication system is configured with an IPV4 address. When performing CAS authentication login, it can only support access to the authentication system through the IPV4 protocol, which has low applicability. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device and computer-readable storage medium for implementing login based on IPV4 and IPV6, so as to realize that the authentication system can simultaneously support IPV4 and IPV6 for authentication and login.

[0005] In a first aspect, the present application provides a method for implementing login based on IPV4 and IPV6, which is applied to an authentication system, wherein the authentication system includes an interceptor group composed of multiple interceptors, and the method includes: determining whether the authentication system needs to enable support for simultaneous access of IPV4 and IPV6; when the authentication system needs to enable support for simultaneous access of IPV4 and IPV6, loading a pre-configured source code; wherein the source code includes a preset address configuration item; when a client sends a login request to an application system, the login request is intercepted by the interceptor group, and a destination IP address is determined from the login request, wherein the destination IP address is the IP address of the application system accessed by the login request; modifying the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address; receiving the login request, and performing login authentication on the client.

[0006] In an embodiment of the present application, by pre-configuring the source code in the authentication system, according to the preset address configuration items and interceptor groups in the source code, the authentication login system is enabled to have the function of supporting authentication login for both IPV4 and IPV6 protocols. Compared with the prior art method of modifying the source code of the authentication system, the workload is reduced and the efficiency is improved.

[0007] In an optional embodiment, after the client is logged in and authenticated, the method further includes: modifying the IP addresses of multiple interceptors in the interceptor group to the IP address of the application system, so that the interceptor group verifies the access request authenticated by the authentication system according to the modified IP address.

[0008] In an embodiment of the present application, after determining the IP address of the application system in the access request, the IP addresses of multiple interceptors in the interceptor group are modified to the IP address of the application system in the access request, so that the protocol type of the IP address of the application system in the interceptor group is consistent with the protocol type of the IP address of the application system in the access request, so that the interceptor group can support verification of access requests of IPV4 protocol or IPV6 protocol, thereby enabling user access to the application system.

[0009] In an optional implementation, the preset address configuration item includes a first IP address configuration item, a second IP address configuration item, a third IP address configuration item and a fourth IP address configuration item, the first IP address configuration item is the IP address of the application system in the IPV4 protocol, the second IP address configuration item is the IP address of the application system in the IPV6 protocol, the third IP address configuration item is the IP address of the authentication system in the IPV4 protocol, the fourth IP address configuration item is the IP address of the authentication system in the IPV6 protocol, the first IP address configuration item corresponds to the third IP address configuration item, and the second IP address configuration item corresponds to the fourth IP address configuration item.

[0010] In an optional implementation, the modifying the current IP address of the authentication system according to the destination IP address and the preset address configuration item includes: when the IP address of the application system is the same as the IP address corresponding to the first IP address configuration item, using the IP address corresponding to the third IP address configuration item as the target IP address of the authentication system; when the IP address of the application system is the same as the IP address corresponding to the second IP address configuration item, using the IP address corresponding to the fourth IP address configuration item as the target IP address of the authentication system.

[0011] In an optional implementation, the multiple interceptors in the interceptor group include a ticket authentication interceptor, a user authentication interceptor, and a request packaging interceptor.

[0012] In an optional implementation, the framework of the authentication system is a spring boot framework.

[0013] In a second aspect, the present application provides a device for implementing login based on IPV4 and IPV6, which is configured in an authentication system, wherein the authentication system includes an interceptor group composed of multiple interceptors, and the device includes: a judgment module, used to judge whether the authentication system needs to enable support for simultaneous access of IPV4 and IPV6; a loading module, used to load a pre-configured source code when the authentication system needs to enable support for simultaneous access of IPV4 and IPV6; wherein the source code includes a preset address configuration item; a determination module, used to intercept the login request through the interceptor group when the client sends a login request to the application system, and determine the destination IP address from the login request, wherein the destination IP address is the IP address of the application system accessed by the login request; a modification module, used to modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address; an authentication module, used to receive the login request and perform login authentication on the client.

[0014] In an optional embodiment, the modification module is also used to modify the IP addresses of multiple interceptors in the interceptor group to the IP address of the application system, so that the interceptor group verifies the access request authenticated by the authentication system according to the modified IP address.

[0015] In an optional implementation, the preset address configuration item includes a first IP address configuration item, a second IP address configuration item, a third IP address configuration item and a fourth IP address configuration item, the first IP address configuration item is the IP address of the application system in the IPV4 protocol, the second IP address configuration item is the IP address of the application system in the IPV6 protocol, the third IP address configuration item is the IP address of the authentication system in the IPV4 protocol, the fourth IP address configuration item is the IP address of the authentication system in the IPV6 protocol, the first IP address configuration item corresponds to the third IP address configuration item, and the second IP address configuration item corresponds to the fourth IP address configuration item.

[0016] In an optional embodiment, the modification module is specifically used to use the IP address corresponding to the third IP address configuration item as the target IP address of the authentication system when the IP address of the application system is the same as the IP address corresponding to the first IP address configuration item; and to use the IP address corresponding to the fourth IP address configuration item as the target IP address of the authentication system when the IP address of the application system is the same as the IP address corresponding to the second IP address configuration item.

[0017] In an optional implementation, the multiple interceptors in the interceptor group include a ticket authentication interceptor, a user authentication interceptor, and a request packaging interceptor.

[0018] In an optional implementation, the framework of the authentication system is a spring boot framework.

[0019] In a third aspect, the present invention provides an electronic device comprising: a processor, a memory and a bus; the processor and the memory communicate with each other via the bus; the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute a method as described in any one of the aforementioned implementations.

[0020] In a fourth aspect, the present invention provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are read and executed by a computer, the method described in any one of the aforementioned embodiments is executed. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0022] Figure 1 A flowchart of a method for implementing login based on IPv4 and IPv6 provided in an embodiment of the present application;

[0023] Figure 2 A structural block diagram of a device for implementing login based on IPv4 and IPv6 provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0026] The embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for implementing login based on IPV4 and IPV6, identifying and judging the IP address in the received access request, matching the identified IP address with the preset address configuration item, and replacing the current IP address of the authentication system with the matched IP address, thereby enabling the authentication system to simultaneously support IPV4 and IPV6 for authentication and login.

[0027] See also Figure 1 , Figure 1 A flowchart of a method for implementing login based on IPv4 and IPv6 is provided in an embodiment of the present application. The method for implementing login based on IPv4 and IPv6 may include the following steps:

[0028] Step 101: Determine whether the authentication system needs to be enabled to support simultaneous access of IPV4 and IPV6.

[0029] Step 102: When the authentication system needs to enable support for simultaneous access of IPV4 and IPV6, load the pre-configured source code.

[0030] Step 103: When the client sends a login request to the application system, the login request is intercepted by the interceptor group, and the destination IP address is determined from the login request.

[0031] Step 104: modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address.

[0032] Step 105: Receive a login request and perform login authentication on the client.

[0033] In an embodiment of the present application, the above-mentioned method for implementing login based on IPV4 and IPV6 is applied to an authentication system, which may be a CAS authentication login system. In actual application, the CAS authentication login system may adopt the SpringBoot architecture. Under the Spring Boot architecture, the CAS authentication login system includes an interceptor group consisting of multiple interceptors. The interceptor group may be written in Java Filter mode.

[0034] The following takes the CAS authentication login system using the Spring Boot architecture as an example to introduce the above method in detail.

[0035] Step 101: Determine whether the authentication system needs to be enabled to support simultaneous access of IPV4 and IPV6.

[0036] Step 102: When the authentication system needs to enable support for simultaneous access of IPV4 and IPV6, load the pre-configured source code.

[0037] In an embodiment of the present application, during the operation of the CAS authentication login system, when the operation and maintenance personnel determine that the user has the need for both IPV4 and IPV6 protocols when accessing the authentication system, they choose to enable the option of supporting simultaneous access of IPV4 and IPV6 by the CAS authentication login system.

[0038] After enabling the CAS authentication login system to support both IPV4 and IPV6 access, the authentication system loads the pre-configured source code. The pre-configured source code includes the preset address configuration item. The preset address configuration item will be described in the subsequent instructions.

[0039] Step 103: When the client sends a login request to the application system, the login request is intercepted by the interceptor group, and the destination IP address is determined from the login request.

[0040] When a user needs to access an application system, the user sends a login request to the application system through the client. In order to improve the security of the application system, the client needs to first access the authentication system of the CAS authentication login system for authentication and login. Only when the authentication login is passed can the user access the application system he wants to access.

[0041] In the embodiment of the present application, the destination IP address is the IP address of the application system accessed by the login request. When the CAS authentication login system receives the login request sent by the user's client, the interceptor group configured in the CAS authentication login system intercepts the access request. The login request includes a URL (Uniform Resource Locator), and the IP address of the application system to be accessed by the login request is determined by parsing the URL in the access request.

[0042] Step 104: modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address.

[0043] It should be noted that, since the CAS authentication login system provided in the embodiment of the present application supports users to perform login authentication through the IPV4 or IPV6 protocol, the type of the IP address of the application system in the login request can be IPV4 or IPV6.

[0044] In the embodiment of the present application, the CAS authentication login system pre-records the source code configured with the preset address configuration item. After the CAS authentication login system intercepts and parses the IP address of the application system in the login request through the interceptor group, it matches the IP address of the application system in the login request with the preset address configuration item, and determines the target IP address of the authentication system corresponding to the IP address of the application system, so that the protocol type of the determined target IP address of the authentication system is the same as the protocol type of the IP address of the application system in the login request.

[0045] In some embodiments, the preset address configuration items include a first IP address configuration item, a second IP address configuration item, a third IP address configuration item, and a fourth IP address configuration item.

[0046] The first IP address configuration item is the IP address of the application system in the IPV4 protocol, the second IP address configuration item is the IP address of the application system in the IPV6 protocol, the third IP address configuration item is the IP address of the authentication system in the IPV4 protocol, and the fourth IP address configuration item is the IP address of the authentication system in the IPV6 protocol. The first IP address configuration item corresponds to the third IP address configuration item, and the second IP address configuration item corresponds to the fourth IP address configuration item.

[0047] For example, under the spring boot architecture, four configuration items are set in the configuration file: local.service.ipv4 (corresponding to the first IP address configuration item mentioned above), local.service.ipv6 (corresponding to the second IP address configuration item mentioned above), iam.server.ipv4 (corresponding to the third IP address configuration item mentioned above) and iam.server.ipv6 (corresponding to the fourth IP address configuration item mentioned above).

[0048] Further, as an optional implementation, the above step 102 may include the following contents:

[0049] When the IP address of the application system is the same as the IP address corresponding to the first IP address configuration item, the IP address corresponding to the third IP address configuration item is used as the target IP address of the authentication system;

[0050] When the IP address of the application system is the same as the IP address corresponding to the second IP address configuration item, the IP address corresponding to the fourth IP address configuration item is used as the target IP address of the authentication system.

[0051] In the embodiment of the present application, after the CAS authentication login system determines the IP address of the application system in the login request, it matches the IP address with the first IP address configuration item and the second IP address configuration item in the preset address configuration item. If the IP address of the application system in the login request is consistent with the first IP address configuration item, it means that this login request is initiated based on the IPV4 protocol, and the third IP address configuration item corresponding to the first IP address configuration item is used as the target IP address of the authentication system. If the IP address of the application system in the login request is consistent with the second IP address configuration item, it means that this login request is initiated based on the IPV6 protocol, and the fourth IP address configuration item corresponding to the second IP address configuration item is used as the target IP address of the authentication system.

[0052] After determining the target IP address of the authentication system, the current IP address of the authentication system is replaced with the target IP address of the authentication system, so that the protocol type of the replaced IP address of the authentication system is consistent with the protocol type of the IP address of the application system in the login request.

[0053] Step 105: Receive the login request and perform login authentication on the client. In the embodiment of the present application, since the protocol type of the modified IP address of the authentication system is consistent with the protocol type of the IP address of the application system in the login request, it can be ensured that the login request can be successfully sent to the authentication system. After receiving the login request, the authentication system authenticates the login request.

[0054] The following is a specific example to illustrate the method for implementing IPV4 and IPV6 based login provided by this application.

[0055] At this moment, the protocol type of the IP address of the authentication system is IPV4. User A sends a login request to the application system through the client using the IPV6 protocol, and the IP address of the application system in the login request is the IP address in the IPV6 protocol. After the interceptor group intercepts the login request, it parses the login request to obtain the IP address of the application system (IPV6 protocol type). After matching the IP address of the application system with the preset address configuration item, it is determined that the target IP address of the authentication system is the IP address of the authentication system in the IPV6 protocol. The current IP address (IPV4 protocol type) of the authentication system is replaced with the target IP address (IPV6 protocol type), and then the login request of user A is sent to the target IP address of the authentication system. Since the protocol type of the IP address of the authentication system is replaced from IPV4 to IPV6, the authentication system can receive the login request of user A and perform authentication.

[0056] After user A completes the authentication login, the protocol type of the IP address of the authentication system is IPV6. User B sends a login request to the application system through the client using the IPV4 protocol, and the IP address of the application system in the login request is the IP address in the IPV4 protocol. After the interceptor group intercepts the login request, it parses the login request to obtain the IP address of the application system (IPV4 protocol type). After matching the IP address of the application system with the preset address configuration item, it is determined that the target IP address of the authentication system is the IP address of the authentication system in the IPV4 protocol. The current IP address (IPV6 protocol type) of the authentication system is replaced with the target IP address (IPV4 protocol type), and then the login request of user B is sent to the target IP address of the authentication system. Since the protocol type of the IP address of the authentication system is replaced from IPV6 to IPV4, the authentication system can receive the login request of user B and perform authentication.

[0057] Further, as an optional implementation, after step 101, the method for implementing login based on IPv4 and IPv6 provided in the embodiment of the present application further includes:

[0058] The IP addresses of multiple interceptors in the interceptor group are modified to the IP address of the application system, so that the interceptor group verifies the login request authenticated by the authentication system according to the modified IP address.

[0059] The user accesses the authentication system for authentication and login. After the authentication and login are passed, the user will receive a ticket sent by the authentication system. When the application system receives the login request authenticated by the authentication system, it verifies the ticket. If the verification is passed, it means that the user has the authority to access the application system and the user is allowed to access. In addition, in the process of the client accessing the application system, processes such as user authentication and HttpServletRequest request packaging are also involved. In the Spring Boot architecture, the above process is verified by interceptors. Therefore, after determining the IP address of the login request, in order to support access to both IPV4 and IPV6 protocols, the IP addresses of multiple interceptors in the interceptor group need to be modified to the IP address of the application system, so that the interceptor group can verify the login request authenticated by the authentication system according to the modified IP address, and finally realize the user's access to the application system.

[0060] In some embodiments, the multiple interceptors in the interceptor group include one or more of a ticket authentication interceptor, a user authentication interceptor, and a request packaging interceptor. It is understandable that the embodiments of the present application do not specifically limit the types of the multiple interceptors in the interceptor group.

[0061] Based on the same inventive concept, the present application also provides a device for implementing login based on IPV4 and IPV6. Figure 2 , Figure 2 A structural block diagram of a device for implementing IPV4 and IPV6 login provided in an embodiment of the present application, wherein the device for implementing IPV4 and IPV6 login is configured in an authentication system, wherein the authentication system includes an interceptor group consisting of a plurality of interceptors, and the device 200 for implementing IPV4 and IPV6 login may include:

[0062] A determination module 201 is used to determine whether the authentication system needs to be enabled to support simultaneous access of IPV4 and IPV6;

[0063] A loading module 202, used to load a pre-configured source code when the authentication system needs to enable support for both IPV4 and IPV6 access; wherein the source code includes a preset address configuration item;

[0064] The determination module 203 is used for intercepting the login request through the interceptor group when the client sends a login request to the application system, and determining the destination IP address from the login request, wherein the destination IP address is the IP address of the application system accessed by the login request;

[0065] A modification module 204, configured to modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address;

[0066] The authentication module 205 is used to receive the login request and perform login authentication on the client.

[0067] In an optional implementation, the modification module 204 is also used to modify the IP addresses of multiple interceptors in the interceptor group to the IP address of the application system, so that the interceptor group verifies the access request authenticated by the authentication system according to the modified IP address.

[0068] In an optional implementation, the preset address configuration item includes a first IP address configuration item, a second IP address configuration item, a third IP address configuration item and a fourth IP address configuration item, the first IP address configuration item is the IP address of the application system in the IPV4 protocol, the second IP address configuration item is the IP address of the application system in the IPV6 protocol, the third IP address configuration item is the IP address of the authentication system in the IPV4 protocol, the fourth IP address configuration item is the IP address of the authentication system in the IPV6 protocol, the first IP address configuration item corresponds to the third IP address configuration item, and the second IP address configuration item corresponds to the fourth IP address configuration item.

[0069] In an optional implementation, the modification module 204 is specifically used to use the IP address corresponding to the third IP address configuration item as the target IP address of the authentication system when the IP address of the application system is the same as the IP address corresponding to the first IP address configuration item; and to use the IP address corresponding to the fourth IP address configuration item as the target IP address of the authentication system when the IP address of the application system is the same as the IP address corresponding to the second IP address configuration item.

[0070] In an optional implementation, the multiple interceptors in the interceptor group include a ticket authentication interceptor, a user authentication interceptor, and a request packaging interceptor.

[0071] In an optional implementation, the framework of the authentication system is a spring boot framework.

[0072] See also Figure 3 , Figure 3 The electronic device 300 of the embodiment of the present application is a schematic diagram of the structure, and the electronic device 300 includes: at least one processor 301, at least one communication interface 302, at least one memory 303 and at least one bus 304. Among them, the bus 304 is used to realize the direct connection and communication of these components, the communication interface 302 is used to communicate signaling or data with other node devices, and the memory 303 stores machine-readable instructions executable by the processor 301. When the electronic device 300 is running, the processor 301 communicates with the memory 303 through the bus 304, and the machine-readable instructions are executed when the processor 301 calls the method for implementing the login based on IPV4 and IPV6 as described above.

[0073] The processor 301 can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. It can implement or execute various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.

[0074] The memory 303 may include but is not limited to random access memory (RAM), read only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable read-only memory (EEPROM), etc.

[0075] Understandably, Figure 3 The structure shown is for illustration only. The electronic device 300 may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown. Figure 3 Each component shown in can be implemented by hardware, software or a combination thereof. In the embodiment of the present application, the electronic device 300 can be, but is not limited to, a physical device such as a desktop computer, a laptop computer, a smart phone, a smart wearable device, a vehicle-mounted device, etc., and can also be a virtual device such as a virtual machine. In addition, the electronic device 300 is not necessarily a single device, but can also be a combination of multiple devices, such as a server cluster, etc.

[0076] In addition, an embodiment of the present application also provides a computer storage medium, on which a computer program is stored. When the computer program is run by a computer, the steps of the method for implementing login based on IPv4 and IPv6 as in the above embodiment are executed.

[0077] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0078] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0079] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0080] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0081] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0082] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for implementing login based on IPV4 and IPV6, characterized in that: Applied to an authentication system, the authentication system includes an interceptor group consisting of a plurality of interceptors, the method includes: Determine whether the authentication system needs to be enabled to support simultaneous access of IPV4 and IPV6; When the authentication system needs to enable support for simultaneous access of IPV4 and IPV6, a pre-configured source code is loaded; wherein the source code includes a preset address configuration item; When the client sends a login request to the application system, the login request is intercepted by the interceptor group, and a destination IP address is determined from the login request, wherein the destination IP address is the IP address of the application system accessed by the login request; Modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address; The login request is received, and login authentication is performed on the client.

2. The method according to claim 1, characterized in that After performing login authentication on the client, the method further includes: The IP addresses of the multiple interceptors in the interceptor group are modified to the IP address of the application system, so that the interceptor group verifies the login request authenticated by the authentication system according to the modified IP address.

3. The method according to any one of claims 1 to 2, characterized in that: The preset address configuration items include a first IP address configuration item, a second IP address configuration item, a third IP address configuration item and a fourth IP address configuration item. The first IP address configuration item is the IP address of the application system in the IPV4 protocol, the second IP address configuration item is the IP address of the application system in the IPV6 protocol, the third IP address configuration item is the IP address of the authentication system in the IPV4 protocol, and the fourth IP address configuration item is the IP address of the authentication system in the IPV6 protocol. The first IP address configuration item corresponds to the third IP address configuration item, and the second IP address configuration item corresponds to the fourth IP address configuration item.

4. The method according to claim 3, characterized in that The modifying the current IP address of the authentication system according to the destination IP address and the preset address configuration item includes: When the IP address of the application system is the same as the IP address corresponding to the first IP address configuration item, using the IP address corresponding to the third IP address configuration item as the target IP address of the authentication system; When the IP address of the application system is the same as the IP address corresponding to the second IP address configuration item, the IP address corresponding to the fourth IP address configuration item is used as the target IP address of the authentication system.

5. The method according to claim 1, characterized in that The multiple interceptors in the interceptor group include a ticket authentication interceptor, a user authentication interceptor and a request packaging interceptor.

6. The method according to claim 5, characterized in that The framework of the authentication system is the spring boot framework.

7. A device for realizing login based on IPV4 and IPV6, characterized in that: Configured in an authentication system, the authentication system includes an interceptor group consisting of a plurality of interceptors, the device includes: A judgment module, used to judge whether the authentication system needs to be enabled to support simultaneous access of IPV4 and IPV6; A loading module, used to load a pre-configured source code when the authentication system needs to enable support for both IPV4 and IPV6 access; wherein the source code includes a preset address configuration item; A determination module, used for intercepting the login request through the interceptor group when the client sends a login request to the application system, and determining a destination IP address from the login request, wherein the destination IP address is the IP address of the application system accessed by the login request; A modification module, used to modify the current IP address of the authentication system according to the destination IP address and the preset address configuration item, so that the modified current IP address of the authentication system is consistent with the protocol type of the destination IP address; The authentication module is used to receive the login request and perform login authentication on the client.

8. The device according to claim 7, characterized in that The modification module is also used to modify the IP addresses of multiple interceptors in the interceptor group to the IP address of the application system, so that the interceptor group verifies the access request authenticated by the authentication system according to the modified IP address.

9. An electronic device, characterized in that: include: processor, memory, and bus; The processor and the memory communicate with each other via the bus; The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 6 by calling the program instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a computer, the method according to any one of claims 1 to 6 is executed.