CN114363054A - Interface request conversion method, interface conversion device, electronic device and storage medium - Google Patents
Interface request conversion method, interface conversion device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114363054A CN114363054A CN202111676321.XA CN202111676321A CN114363054A CN 114363054 A CN114363054 A CN 114363054A CN 202111676321 A CN202111676321 A CN 202111676321A CN 114363054 A CN114363054 A CN 114363054A
- Authority
- CN
- China
- Prior art keywords
- authentication
- user information
- server
- information
- interface
- 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
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 99
- 238000000034 method Methods 0.000 title claims abstract description 68
- 230000004044 response Effects 0.000 claims description 26
- 238000004590 computer program Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 claims description 8
- 238000013519 translation Methods 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 abstract description 28
- 230000006978 adaptation Effects 0.000 abstract description 12
- 238000005516 engineering process Methods 0.000 abstract description 11
- 230000002457 bidirectional effect Effects 0.000 abstract description 5
- 230000009286 beneficial effect Effects 0.000 abstract description 2
- 238000004891 communication Methods 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000013461 design Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Landscapes
- Computer And Data Communications (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides an interface request conversion method, which is applied to an interface conversion device and comprises the following steps: receiving first user information sent by a client, and performing identity authentication on the first user information by using a first authentication mode; when the first user information is determined to pass the authentication, acquiring prestored second user information, and sending the second user information to the server side so that the server side can perform identity authentication on the second user information by using a second authentication mode; when the second user information is determined to pass the authentication, providing interface request conversion service for the client and the server; the method can perform bidirectional security authentication adaptation for the client and the server, avoid adaptation work caused by different security authentication mechanisms of the client and the server in the related technology, and further improve the flexibility of the security authentication mechanism. The invention also provides an interface conversion device, electronic equipment and a storage medium, which have the beneficial effects.
Description
Technical Field
The present invention relates to the field of network applications, and in particular, to an interface request conversion method, an interface conversion apparatus, an electronic device, and a storage medium.
Background
With the continuous development of network technology, security authentication has become an indispensable part in network communication. At present, a client for network communication and a server for providing interface service are both provided with a security authentication mechanism, and can communicate with each other only after passing security authentication. However, the security authentication mechanisms are various, and when the security authentication mechanisms of the client and the server are different, the developer can only re-adapt the client or the server, and the additional adaptation work will increase the work pressure of the developer.
Disclosure of Invention
The invention aims to provide an interface request conversion method, an interface conversion device, electronic equipment and a storage medium, which can perform bidirectional security authentication adaptation for a client and a server, avoid adaptation work caused by different security authentication mechanisms of the client and the server in the related technology, and further improve the flexibility of the security authentication mechanism.
In order to solve the above technical problem, the present invention provides an interface request conversion method, which is applied to an interface conversion device, and the method includes:
receiving first user information sent by a client, and performing identity authentication on the first user information by using a first authentication mode;
when the first user information is determined to pass the authentication, acquiring prestored second user information, and sending the second user information to a server side, so that the server side performs identity authentication on the second user information by using a second authentication mode;
and when the second user information is determined to pass the authentication, providing interface request conversion service for the client and the server.
Optionally, the performing identity authentication on the first user information by using a first authentication manner includes:
sending the first user information to a third party authentication end so that the third party authentication end authenticates the first user information by using the first authentication mode and returns response information when determining that the first user information passes the authentication;
and when the response information is received, determining that the first user information is authenticated.
Optionally, before acquiring the pre-stored second user information, the method further includes:
configuring a preset plug-in;
correspondingly, the acquiring the pre-stored second user information and sending the second user information to the server includes:
and acquiring pre-stored second user information by using the preset plug-in, and sending the second user information to a server.
Optionally, the receiving the first user information sent by the client includes:
receiving an authentication request sent by the client, and extracting the first user information from the authentication request; and the client generates the authentication request in a mode of writing the first user information into a preset entry position in a preset URL path.
Optionally, the performing identity authentication on the first user information by using a first authentication manner includes:
performing identity authentication on the first user information, and judging whether the first user information passes the authentication;
if so, generating first authentication information by using the first authentication mode and the first user information, and sending the first authentication information to the client.
Optionally, after sending the second user information to the server, the method further includes:
and receiving second authentication information generated by the server side by using the second authentication mode and the second user information after the server side determines that the second user information passes the authentication.
Optionally, the providing an interface request conversion service for the client and the server includes:
when a first interface request sent by the client is received, extracting the first authentication information and request content from the interface request;
authenticating the first authentication information by using the first authentication mode, and generating a second interface request by using the second authentication information and the request load when the first authentication information is determined to pass the authentication;
sending the second interface request to the server, so that the server authenticates the second authentication information by using the second authentication mode, and processes the request load and returns request response information when determining that the second authentication information passes authentication;
and receiving the request response information, and sending the request response information to the server.
The present invention also provides an interface conversion apparatus, comprising:
the authentication module is used for receiving first user information sent by a client and carrying out identity authentication on the first user information by utilizing a first authentication mode;
the sending module is used for acquiring prestored second user information when the first user information is determined to pass the authentication, and sending the second user information to the server so that the server performs identity authentication on the second user information by using a second authentication mode;
and the interface request conversion module is used for providing interface request conversion service for the client and the server when the second user information is determined to pass the authentication.
The present invention also provides an electronic device comprising:
a memory for storing a computer program;
and the processor is used for realizing the interface request conversion method when executing the computer program.
The invention also provides a storage medium, wherein the storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the interface request conversion method is realized.
The invention provides an interface request conversion method, which is applied to an interface conversion device and comprises the following steps: receiving first user information sent by a client, and performing identity authentication on the first user information by using a first authentication mode; when the first user information is determined to pass the authentication, acquiring prestored second user information, and sending the second user information to a server side, so that the server side performs identity authentication on the second user information by using a second authentication mode; and when the second user information is determined to pass the authentication, providing interface request conversion service for the client and the server.
Therefore, in the invention, when the interface conversion device receives the first user information sent by the client, the first user information is directly authenticated by using the first authentication mode, the security authentication mechanism of the client can be adapted, and the security authentication requirement of the client is met; in addition, after the first user information is determined to pass the authentication, the interface conversion device can further acquire the pre-stored second user information and send the second user information to the server, so that the server performs identity authentication on the second user information, the security authentication mechanism of the server can be adapted, the security authentication requirement of the server can be met, and interface request conversion service can be provided for the client and the server after the two-way security authentication passes. In other words, the invention can carry out bidirectional security authentication adaptation for the client and the server, can avoid adaptation work caused by different security authentication mechanisms of the client and the server in the related technology, and further can improve the flexibility of the security authentication mechanism. The invention also provides an interface request conversion system and a storage medium, which have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an interface request conversion method according to an embodiment of the present invention;
fig. 2 is a flowchart of another interface request conversion method according to an embodiment of the present invention;
fig. 3 is a block diagram of an interface conversion apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
With the continuous development of network technology, security authentication has become an indispensable part in network communication. At present, a client for network communication and a server for providing interface service are both provided with a security authentication mechanism, and can communicate with each other only after passing security authentication. However, the security authentication mechanisms are various, and when the security authentication mechanisms of the client and the server are different, the developer can only re-adapt the client or the server, and the additional adaptation work will increase the work pressure of the developer. In view of this, the present invention can provide an interface request conversion method, which can perform bidirectional security authentication adaptation for a client and a server, thereby avoiding adaptation caused by different security authentication mechanisms of the client and the server in the related art, and further improving the flexibility of the security authentication mechanism. Referring to fig. 1, fig. 1 is a flowchart of an interface request conversion method according to an embodiment of the present invention, where the method is applied to an interface conversion apparatus, and may include:
s101, receiving first user information sent by a client, and performing identity authentication on the first user information by using a first authentication mode.
In the embodiment of the invention, the interface conversion device is firstly adapted to the security authentication mechanism of the client side. Specifically, the interface conversion device is adapted to a security authentication mechanism of the client, a first authentication mode is added, and the client can directly perform security authentication with the interface conversion device by using a mode of accessing the server. In short, for the client, the interface conversion device can be regarded as a server. It should be noted that the embodiment of the present invention does not limit the specific first authentication manner, and may be, for example, HTTP authentication (hypertext Transfer Protocol), such as Token authentication (Token authentication), basic authentication (basic authentication), digest authentication (digest authentication), and may also be HTTPs authentication (hypertext Transfer Protocol over Secure Socket Layer), such as one-way authentication and two-way authentication. When the first authentication mode is HTTPS authentication, the interface conversion apparatus needs to additionally configure certificate information required for authentication. In the HTTP authentication and HTTPs authentication mechanisms, in order to avoid repeated authentication, the authentication end generally generates authentication information for the authenticated end, and therefore, in the embodiment of the present invention, after confirming that the first user information passes authentication, the interface conversion apparatus generates the authentication information for the client by using the relevant authentication method and the first user information.
In a possible case, performing identity authentication on the first user information by using the first authentication method may include:
step 11: performing identity authentication on the first user information, and judging whether the first user information passes the authentication; if yes, go to step 12; if not, ignoring or quitting the identity authentication;
step 12: and generating first authentication information by using the first authentication mode and the first user information, and sending the first authentication information to the client.
It should be noted that, the embodiment of the present invention does not limit the specific first authentication information, for example, Token, digest information, and the like, and reference may be made to related technologies of HTTP authentication and HTTPs authentication.
Of course, the first authentication method may also be a special authentication method that is not mainstream, and may be set according to the actual application requirements. Further, since the special authentication method is usually configured with a third-party authentication end for performing individual authentication, when receiving the first user information of the client, the interface conversion device may forward the first user information to the third-party authentication end for processing.
In one possible case, performing identity authentication on first user information by using a first authentication manner includes:
step 21: sending the first user information to a third party authentication end so that the third party authentication end authenticates the first user information by using a first authentication mode and returns response information when the first user information is determined to pass the authentication;
step 22: and when the response information is received, determining that the first user information is authenticated.
It can be understood that, since the authentication operation is performed by the third party authenticator, the interface conversion apparatus needs to receive the response information returned by the third party authenticator and determine whether the first user information passes the verification according to the response information. It should be noted that, the embodiment of the present invention does not limit the specific content of the response message, as long as it can indicate that the first user information passes the authentication, and the first user information is set according to the actual application requirement. Of course, the interface conversion device may further send the response information to the client, and the step may also be set according to the actual application requirement.
Further, the embodiment of the present invention does not limit the specific content that the first user information may include, for example, a user name, a password, and other general user information, and of course, may also include special information such as a client identifier, an application ID, and an IP address, and may be set according to actual application requirements. Further, the embodiment of the present invention does not limit the way in which the client sends the first user information to the interface conversion device, and may refer to the related technology of the network packet. Preferably, since the interface conversion apparatus generally has a URL path (Uniform Resource Locator) accessible from the outside, a preset parameter writing position (i.e. a preset parameter entering position) may be added to the URL, and the client may fill the user information into the parameter entering position in the URL path to obtain the authentication request, and send the authentication request to the interface conversion apparatus. It should be noted that, the embodiment of the present invention does not limit the specific URL path, and also does not limit the specific manner of adding the reference location in the URL path, and may refer to the related technology of the URL.
In a possible case, receiving the first user information sent by the client may include:
step 31: receiving an authentication request sent by a client, and extracting first user information from the authentication request; the client generates an authentication request in a mode of writing the first user information into a preset entry position in a preset URL path.
Of course, the generation process of the authentication request may include more steps, and reference may be made to the related network technology.
Furthermore, it should be noted that the embodiment of the present invention does not limit the number of clients connectable to a single interface conversion device, and may be one or multiple, and may be set according to actual application requirements.
S102, when the first user information is confirmed to pass the authentication, pre-stored second user information is obtained, and the second user information is sent to the server side, so that the server side can carry out identity authentication on the second user information in a second authentication mode.
In the embodiment of the present invention, the interface conversion apparatus is further adapted to a security authentication mechanism of the server. Specifically, the interface conversion device may access the server by using a single set of second user information, and the server may perform identity authentication on the second user information by using a normal security authentication mechanism (i.e., a second authentication method). In short, for the server, the interface conversion device can be regarded as the client. It is understood that the first authentication manner is different from the second authentication manner. It should be noted that, the second authentication method in the embodiment of the present invention is the same as the first authentication method, for example, the second authentication method may also be HTTP authentication and HTTPs authentication, and during the authentication process, similar to the interface conversion apparatus, after determining that the user information sent by the apparatus passes the authentication, the server may also generate related authentication information for the apparatus, and the interface conversion apparatus needs to acquire the authentication information returned by the server.
In a possible case, after sending the second user information to the server, the method may further include:
step 41: and the receiving server generates second authentication information by using a second authentication mode and the second user information after determining that the second user information passes the authentication.
Of course, the second authentication method may be a special authentication method. At this time, a preset plug-in matched with the special authentication mode can be preset in the interface conversion device so as to complete the identity authentication process by matching with the server.
In a possible case, before obtaining the pre-stored second user information, the method may further include:
step 51: configuring a preset plug-in;
correspondingly, the method for acquiring the pre-stored second user information and sending the second user information to the server includes:
step 61: and acquiring pre-stored second user information by using a preset plug-in, and sending the second user information to the server.
It should be noted that, the embodiment of the present invention does not limit the specific preset plugin, and reference may be made to the related technology of the security authentication mechanism.
Further, it should be noted that, the definition description of the second user mode in the embodiment of the present invention is the same as that of the first user mode, and reference may also be made to the related description in the above embodiment.
Furthermore, it should be noted that the number of servers connectable to the interface conversion device is not limited in the embodiments of the present invention, and may be one or more. It is understood that, when the number of the service terminals is multiple, the interface conversion device may also set multiple sets of the second user information corresponding to the service terminals.
Further, it should be noted that step S101 and step S102 may also be completed separately, for example, the interface conversion apparatus completes the identity authentication with the client first, and then completes the identity authentication with the server; the identity authentication can be completed with the server side firstly and then with the client side, and the setting can be carried out according to the actual application requirements. Of course, if the interface conversion device completes the identity authentication with the client first and then completes the identity authentication with the server, after the authentication process with the client is completed, the interface conversion device can complete the identity authentication with the server when receiving the interface request sent from the client to the server.
S103, when the second user information is determined to pass the authentication, providing interface request conversion service for the client and the server.
It can be understood that, because the security authentication mechanisms of the client and the server are different, and the interface requests associated therewith are also different, the interface conversion apparatus needs to repackage the interface request sent by the client, obtain a new interface request capable of accessing the server, and forward the new interface request to the client, so as to implement the access of the client to the server. Of course, if the first authentication method generates the first authentication information or the second authentication method generates the second authentication information, the related authentication information should be replaced and repackaged when the interface request is packaged. Specifically, if the first authentication mode generates the first authentication information and the second authentication mode does not generate the second authentication information, the interface conversion device only needs to repackage the actual request content in the interface request; if the first authentication mode does not generate the first authentication information and the second authentication mode generates the second authentication information, the interface conversion device not only needs to repackage the actual request content in the interface request, but also needs to additionally package the second authentication information so that the server side can check the second authentication information; if the first authentication mode generates the first authentication information and the second authentication mode also generates the second authentication information, the client usually packages the first authentication information into the interface request, at this time, the interface conversion device needs to verify the first authentication information, repackages the actual request content in the interface request after the verification is passed, and replaces the first authentication information in the original request with the second authentication information. After the request is forwarded, the server performs relevant processing on the interface request and returns request response information to the interface conversion device, and at this time, the device only needs to return the information to the client.
In one possible scenario, providing an interface request translation service for a client and a server includes:
step 71: when a first interface request sent by a client is received, extracting first authentication information and request content from the interface request;
step 72: authenticating the first authentication information by using a first authentication mode, and generating a second interface request by using the second authentication information and the request load when the first authentication information is determined to pass the authentication;
step 73: sending the second interface request to the server so that the server authenticates the second authentication information by using a second authentication mode, and processing a request load and returning request response information when determining that the second authentication information passes the authentication;
step 74: and receiving the request response information, and sending the request response information to the server.
Based on the above embodiment, in the embodiment of the present invention, when receiving the first user information sent by the client, the interface conversion device directly performs identity authentication on the first user information by using the first authentication method, so as to adapt to a security authentication mechanism of the client and meet the security authentication requirement of the client; in addition, after the first user information is determined to pass the authentication, the interface conversion device can further acquire the pre-stored second user information and send the second user information to the server, so that the server performs identity authentication on the second user information, the security authentication mechanism of the server can be adapted, the security authentication requirement of the server can be met, and interface request conversion service can be provided for the client and the server after the two-way security authentication passes. In other words, the invention can carry out bidirectional security authentication adaptation for the client and the server, can avoid adaptation work caused by different security authentication mechanisms of the client and the server in the related technology, and further can improve the flexibility of the security authentication mechanism.
The interface request conversion method described above is described below based on a specific timing chart. Referring to fig. 2, fig. 2 is a flowchart illustrating another interface request conversion method according to an embodiment of the present invention. The process mainly comprises the following steps:
1. the relationship between the interface conversion service and the real back-end service is the relationship between the client and the server, so that the interface adapted to the real back-end service is a southbound interface for the interface conversion service. When the back-end real service is configured, the authentication mode and the authentication information supported by the back-end real service are configured at the same time, for example, the user id and the user password information required by token authentication. Since the back-end real service is generally a standard authentication specification, it is basically only necessary to support several common standard authentication specifications to satisfy most scenarios. Meanwhile, if the authentication mode used by the back-end real service is also special customized and unconventional, the method can be adapted in a plug-in mode.
2. The relationship between the user or application and the interface conversion service, and the relationship between the client and the server, therefore, for the interface conversion service, the interface provided for the user or application is a northbound interface. And when configuring the northbound interface parameters, configuring a northbound authentication mode and authentication information at the same time. In addition to several common standard authentication specifications, for a specially customized authentication condition, a reference input needs to be added in a request url path during interface service configuration, and identification is a parameter for authentication. The customized authenticated parameters, whether they pass the authentication, can be confirmed by another interface service, and the interface can also be completed by the configured entry in the previous stage of the interface conversion service.
3. The north direction of the interface conversion service is used as a server of a user or an application on the whole, an authentication mechanism of a demand end is borne, after the authentication is judged to pass, authentication information of the south real service is packaged, and the real service is requested to acquire actual data in a real service client side mode.
The following describes an interface conversion apparatus and a storage medium according to an embodiment of the present invention, and the interface conversion apparatus and the storage medium described below and the interface request conversion method described above may be referred to correspondingly. Referring to fig. 3, fig. 3 is a block diagram of an interface conversion apparatus according to an embodiment of the present invention, where the apparatus may include:
the authentication module 301 is configured to receive first user information sent by a client, and perform identity authentication on the first user information by using a first authentication method;
a sending module 302, configured to, when it is determined that the first user information passes the authentication, obtain pre-stored second user information, and send the second user information to the server, so that the server performs identity authentication on the second user information in a second authentication manner;
and the interface request conversion module 303 is configured to provide an interface request conversion service for the client and the server when it is determined that the second user information is authenticated.
Optionally, the authentication module 301 may include:
the first authentication sub-module is used for sending the first user information to the third-party authentication terminal so that the third-party authentication terminal authenticates the first user information by using a first authentication mode and returns response information when the first user information is determined to pass the authentication;
and the passing judgment sub-module is used for determining that the first user information is authenticated when the response information is received.
Optionally, the apparatus may further include:
the configuration module is used for configuring a preset plug-in;
accordingly, the sending module 302 may include:
and the first sending submodule is used for acquiring the pre-stored second user information by using the preset plug-in and sending the second user information to the server.
Optionally, the authentication module 301 may include:
the receiving submodule is used for receiving an authentication request sent by a client and extracting first user information from the authentication request; the client generates an authentication request in a mode of writing the first user information into a preset entry position in a preset URL path.
Optionally, the authentication module 301 may include:
the second authentication sub-module is used for performing identity authentication on the first user information and judging whether the first user information passes the authentication;
and the authentication information generation sub-module is used for generating first authentication information by using the first authentication mode and the first user information and sending the first authentication information to the client if the first authentication mode is positive.
Optionally, the apparatus may further include:
and the receiving module is used for receiving second authentication information generated by the server side by using a second authentication mode and the second user information after the second user information is determined to pass the authentication.
Optionally, the interface request conversion module 303 may include:
the first request receiving submodule is used for extracting first authentication information and request content from an interface request when the first interface request sent by a client is received;
the third authentication sub-module is used for authenticating the first authentication information by using the first authentication mode and generating a second interface request by using the second authentication information and the request load when the first authentication information is determined to pass the authentication;
the second sending submodule is used for sending the second interface request to the server so that the server authenticates second authentication information by using a second authentication mode, and processes a request load and returns request response information when the second authentication information is determined to pass the authentication;
and the response forwarding submodule is used for receiving the request response information and sending the request response information to the server.
An embodiment of the present invention further provides an electronic device, including:
a memory for storing a computer program;
a processor for implementing the steps of the interface request conversion method when executing the computer program.
Since the embodiment of the electronic device portion corresponds to the embodiment of the interface request conversion method portion, for the embodiment of the electronic device portion, reference is made to the description of the embodiment of the interface request conversion method portion, and details are not repeated here.
The embodiment of the present invention further provides a storage medium, where a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the interface request conversion method according to any of the above embodiments are implemented.
Since the embodiment of the storage medium portion and the embodiment of the interface request conversion method portion correspond to each other, please refer to the description of the embodiment of the interface request conversion method portion for the embodiment of the storage medium portion, which is not repeated here.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The interface request conversion method, the interface conversion device, the electronic device and the storage medium provided by the invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Claims (10)
1. An interface request conversion method is applied to an interface conversion device, and comprises the following steps:
receiving first user information sent by a client, and performing identity authentication on the first user information by using a first authentication mode;
when the first user information is determined to pass the authentication, acquiring prestored second user information, and sending the second user information to a server side, so that the server side performs identity authentication on the second user information by using a second authentication mode;
and when the second user information is determined to pass the authentication, providing interface request conversion service for the client and the server.
2. The interface request converting method according to claim 1, wherein the performing identity authentication on the first user information by using the first authentication means includes:
sending the first user information to a third party authentication end so that the third party authentication end authenticates the first user information by using the first authentication mode and returns response information when determining that the first user information passes the authentication;
and when the response information is received, determining that the first user information is authenticated.
3. The interface request conversion method according to claim 1, further comprising, before acquiring the pre-stored second user information:
configuring a preset plug-in;
correspondingly, the acquiring the pre-stored second user information and sending the second user information to the server includes:
and acquiring pre-stored second user information by using the preset plug-in, and sending the second user information to a server.
4. The interface request converting method according to claim 1, wherein the receiving the first user information sent by the client includes:
receiving an authentication request sent by the client, and extracting the first user information from the authentication request; and the client generates the authentication request in a mode of writing the first user information into a preset entry position in a preset URL path.
5. The interface request conversion method according to any one of claims 1 to 4, wherein the performing identity authentication on the first user information by using the first authentication means includes:
performing identity authentication on the first user information, and judging whether the first user information passes the authentication;
if so, generating first authentication information by using the first authentication mode and the first user information, and sending the first authentication information to the client.
6. The interface request conversion method according to claim 5, further comprising, after sending the second user information to a server:
and receiving second authentication information generated by the server side by using the second authentication mode and the second user information after the server side determines that the second user information passes the authentication.
7. The interface request converting method according to claim 6, wherein the providing the interface request converting service for the client and the server comprises:
when a first interface request sent by the client is received, extracting the first authentication information and request content from the interface request;
authenticating the first authentication information by using the first authentication mode, and generating a second interface request by using the second authentication information and the request load when the first authentication information is determined to pass the authentication;
sending the second interface request to the server, so that the server authenticates the second authentication information by using the second authentication mode, and processes the request load and returns request response information when determining that the second authentication information passes authentication;
and receiving the request response information, and sending the request response information to the server.
8. An interface conversion apparatus, comprising:
the authentication module is used for receiving first user information sent by a client and carrying out identity authentication on the first user information by utilizing a first authentication mode;
the sending module is used for acquiring prestored second user information when the first user information is determined to pass the authentication, and sending the second user information to the server so that the server performs identity authentication on the second user information by using a second authentication mode;
and the interface request conversion module is used for providing interface request conversion service for the client and the server when the second user information is determined to pass the authentication.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the interface request translation method of any one of claims 1 to 7 when executing the computer program.
10. A storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, carry out the interface request translation method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111676321.XA CN114363054B (en) | 2021-12-31 | 2021-12-31 | Interface request conversion method, interface conversion device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111676321.XA CN114363054B (en) | 2021-12-31 | 2021-12-31 | Interface request conversion method, interface conversion device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114363054A true CN114363054A (en) | 2022-04-15 |
CN114363054B CN114363054B (en) | 2023-12-01 |
Family
ID=81105991
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111676321.XA Active CN114363054B (en) | 2021-12-31 | 2021-12-31 | Interface request conversion method, interface conversion device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114363054B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102763395A (en) * | 2010-02-17 | 2012-10-31 | 诺基亚公司 | Method and apparatus for providing an authentication context-based session |
CN103081521A (en) * | 2010-08-31 | 2013-05-01 | 英特尔公司 | Roaming between networks employing different authentication protocols |
WO2016104835A1 (en) * | 2014-12-24 | 2016-06-30 | 주식회사 파수닷컴 | User authentication device and method using authentication proxy |
US9720750B1 (en) * | 2016-09-23 | 2017-08-01 | International Business Machines Corporation | Invoking a restricted access service through a restful interface |
CN107483509A (en) * | 2017-10-09 | 2017-12-15 | 武汉斗鱼网络科技有限公司 | A kind of auth method, server and readable storage medium storing program for executing |
CN107995216A (en) * | 2017-12-21 | 2018-05-04 | 北京东土军悦科技有限公司 | A kind of safety certifying method, device, certificate server and storage medium |
CN110399713A (en) * | 2018-07-27 | 2019-11-01 | 腾讯科技(北京)有限公司 | A kind of method and relevant apparatus of authentification of message |
CN110493352A (en) * | 2019-08-30 | 2019-11-22 | 南京联创互联网技术有限公司 | A kind of unified gateway service system and its method of servicing based on WEB middleware |
CN112261022A (en) * | 2020-10-15 | 2021-01-22 | 四川长虹电器股份有限公司 | Security authentication method based on API gateway |
CN113190828A (en) * | 2021-05-25 | 2021-07-30 | 网宿科技股份有限公司 | Request proxy method, client device and proxy service device |
CN113342543A (en) * | 2021-05-24 | 2021-09-03 | 杭州数梦工场科技有限公司 | Authentication center docking method, device, system and storage medium |
CN113434836A (en) * | 2021-05-31 | 2021-09-24 | 深信服科技股份有限公司 | Identity authentication method, device, equipment and medium |
CN113852681A (en) * | 2021-09-22 | 2021-12-28 | 深信服科技股份有限公司 | Gateway authentication method and device and security gateway equipment |
-
2021
- 2021-12-31 CN CN202111676321.XA patent/CN114363054B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102763395A (en) * | 2010-02-17 | 2012-10-31 | 诺基亚公司 | Method and apparatus for providing an authentication context-based session |
CN103081521A (en) * | 2010-08-31 | 2013-05-01 | 英特尔公司 | Roaming between networks employing different authentication protocols |
WO2016104835A1 (en) * | 2014-12-24 | 2016-06-30 | 주식회사 파수닷컴 | User authentication device and method using authentication proxy |
US9720750B1 (en) * | 2016-09-23 | 2017-08-01 | International Business Machines Corporation | Invoking a restricted access service through a restful interface |
CN107483509A (en) * | 2017-10-09 | 2017-12-15 | 武汉斗鱼网络科技有限公司 | A kind of auth method, server and readable storage medium storing program for executing |
CN107995216A (en) * | 2017-12-21 | 2018-05-04 | 北京东土军悦科技有限公司 | A kind of safety certifying method, device, certificate server and storage medium |
CN110399713A (en) * | 2018-07-27 | 2019-11-01 | 腾讯科技(北京)有限公司 | A kind of method and relevant apparatus of authentification of message |
CN110493352A (en) * | 2019-08-30 | 2019-11-22 | 南京联创互联网技术有限公司 | A kind of unified gateway service system and its method of servicing based on WEB middleware |
CN112261022A (en) * | 2020-10-15 | 2021-01-22 | 四川长虹电器股份有限公司 | Security authentication method based on API gateway |
CN113342543A (en) * | 2021-05-24 | 2021-09-03 | 杭州数梦工场科技有限公司 | Authentication center docking method, device, system and storage medium |
CN113190828A (en) * | 2021-05-25 | 2021-07-30 | 网宿科技股份有限公司 | Request proxy method, client device and proxy service device |
CN113434836A (en) * | 2021-05-31 | 2021-09-24 | 深信服科技股份有限公司 | Identity authentication method, device, equipment and medium |
CN113852681A (en) * | 2021-09-22 | 2021-12-28 | 深信服科技股份有限公司 | Gateway authentication method and device and security gateway equipment |
Also Published As
Publication number | Publication date |
---|---|
CN114363054B (en) | 2023-12-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107483509B (en) | A kind of auth method, server and readable storage medium storing program for executing | |
CN106101258B (en) | Interface calling method, device and system of hybrid cloud | |
CN101027676B (en) | A personal token and a method for controlled authentication | |
US9648006B2 (en) | System and method for communicating with a client application | |
CN106209726B (en) | Mobile application single sign-on method and device | |
CN113381979B (en) | Access request proxy method and proxy server | |
US11483155B2 (en) | Access control using proof-of-possession token | |
US11122056B2 (en) | Systems and methods for binding authorization to a proxy using a get/authorize URL through a native application | |
US10630574B2 (en) | Link processing method, apparatus, and system | |
CN108322416B (en) | Security authentication implementation method, device and system | |
CN102217280B (en) | Method, system, and server for user service authentication | |
CN106559405B (en) | Portal authentication method and equipment | |
CN112491881A (en) | Cross-platform single sign-on method, system, electronic equipment and storage medium | |
CN112468442B (en) | Double-factor authentication method and device, computer equipment and storage medium | |
CN110958119A (en) | Identity verification method and device | |
CN111447184A (en) | Single sign-on method, device, system and computer readable storage medium | |
CN111404695B (en) | Token request verification method and device | |
CN112491890A (en) | Access method and device | |
CN110730189A (en) | Communication authentication method, device, equipment and storage medium | |
CN111698097B (en) | Certificate authentication method and device | |
WO2012097728A1 (en) | Method and device for proxy access of open platform | |
CN114363054B (en) | Interface request conversion method, interface conversion device, electronic equipment and storage medium | |
CN111211902A (en) | Digital signature method and device based on enterprise browser | |
WO2019184206A1 (en) | Identity authentication method and apparatus | |
CN110830420A (en) | Method and system for verifying short message verification code |
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 |