Nothing Special   »   [go: up one dir, main page]

CN109309667A - The authentication method and device, storage medium and electronic equipment that interface calls - Google Patents

The authentication method and device, storage medium and electronic equipment that interface calls Download PDF

Info

Publication number
CN109309667A
CN109309667A CN201810990921.5A CN201810990921A CN109309667A CN 109309667 A CN109309667 A CN 109309667A CN 201810990921 A CN201810990921 A CN 201810990921A CN 109309667 A CN109309667 A CN 109309667A
Authority
CN
China
Prior art keywords
call number
certification message
received
number information
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810990921.5A
Other languages
Chinese (zh)
Other versions
CN109309667B (en
Inventor
范超
李东鸽
牟晓光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Neusoft Corp
Original Assignee
Neusoft Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Neusoft Corp filed Critical Neusoft Corp
Priority to CN201810990921.5A priority Critical patent/CN109309667B/en
Publication of CN109309667A publication Critical patent/CN109309667A/en
Application granted granted Critical
Publication of CN109309667B publication Critical patent/CN109309667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The authentication method and device, storage medium and electronic equipment called purpose of this disclosure is to provide a kind of interface, to solve the problems, such as that interface calls safety insufficient in the related technology.Method is applied to call originating end, the described method includes: generating the certification message for calling called terminal interface, the certification message includes call number information, and it is which time that the calling originating end is initiated to the called terminal is called that the call number information, which indicates that this interface calls,;The certification message is sent to the called terminal;Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;The call number information for the called terminal determine historical reception to certification message in call number information, when identical as the call number that the call number information in the certification message that this is received indicates, the certification message for assert that this is received is illegal.

Description

The authentication method and device, storage medium and electronic equipment that interface calls
Technical field
This disclosure relates to field of information processing, and in particular, to a kind of authentication method and device of interface calling, storage are situated between Matter and electronic equipment.
Background technique
With the development of information technology, the business field for the distributed deployment that multiple registration services are registered in ASC administrative service center The scape the next common.When being registered, originating end is called to initiate interface call request to called terminal.And called terminal is in order to true The legitimacy for recognizing calling needs to authenticate interface call request.
In the related art, it calls originating end when calling called terminal interface, is generated and authenticated using username and password Message, and the certification message is sent to called terminal.After called terminal receives certification message, however, it is determined that the user carried in message Name and password are errorless, then provide interface service to calling originating end.
However, molecule intercepts the certification message if it is illegal, illegal molecule can be whithin a period of time again to calling Originating end sends the certification message, and since the username and password carried in the certification message is all effectively, called terminal exists When receiving the certification message, it may authenticate whether the originating end of message be legal because that can not differentiate, and to illegal molecule Interface service is provided.Therefore, call safety that cannot be effectively ensured using interface in the related technology.
Summary of the invention
The authentication method and device, storage medium and electronic equipment called purpose of this disclosure is to provide a kind of interface, with Solve the problems, such as that interface calls safety insufficient in the related technology.
To achieve the goals above, in a first aspect, the disclosure provides a kind of authentication method that interface calls, the method is answered For calling originating end, which comprises
The certification message for calling called terminal interface is generated, the certification message includes call number information, described It is which time that the calling originating end is initiated to the called terminal is called that call number information, which indicates that this interface calls,;
The certification message is sent to the called terminal;
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;
The call number information for the called terminal determine historical reception to certification message in calling it is secondary Number information assert that this connects when identical as the call number that the call number information in the certification message that this is received indicates The certification message received is illegal.
Optionally, the method also includes:
The certification message for calling originating end to send every time further includes the allocating time information that this is called, the calling Temporal information indicates the initiation time that this interface calls;
The allocating time information is used for, the called terminal determine historical reception to certification message in calling time The call number that information indicates is counted, the call number that the call number information in the certification message received less than this indicates, And the historical reception to certification message in allocating time information indicate the initiation time, be later than the certification that this is received and disappear When the initiation time that the allocating time information in breath indicates, the certification message for assert that this is received is illegal.
Optionally, before the certification message in the generation for calling called terminal interface, the method also includes:
Determine the period locating for the initiation time of this interface calling;
The certification message generated for calling called terminal interface, comprising:
Generate the certification message for calling called terminal interface, the call number letter for including in the certification message Breath, for indicating that this interface calling is the calling originating end, to institute in the period locating for the initiation time Which time for stating called terminal initiation is called.
Optionally, the method also includes:
It is described call the certification message that sends every time of originating end further include the calling originating end and the called terminal about Fixed default verification code information;
The verification code information is determining the identifying code letter in the certification message that this is received for the called terminal Breath, when inconsistent with default verification code information, the certification message for assert that this is received is illegal.
Second aspect, the disclosure provide a kind of authentication method that interface calls, and the method is applied to called terminal, described Method includes:
The certification message for calling called terminal interface is received, the certification message includes call number information, described It is which time for calling originating end to initiate to the called terminal is called that call number information, which indicates that this interface calls,;
Judge historical reception to certification message in call number information, the tune in certification message received with this Whether the call number indicated with number information is identical;
If it exists historical reception to certification message in the certification message that is received with this of call number information in The call number that call number information indicates is identical, then the certification message for assert that this is received is illegal.
Optionally, this described certification message received further includes allocating time information, the allocating time information table Show the initiation time that this interface calls;
The method also includes:
If it does not exist historical reception to certification message in the certification message that is received with this of call number information in The call number that indicates of call number information it is identical, then judge whether there is call number and disappear less than this certification received The call number that call number information indicates in breath, and the initiation time is later than the allocating time in the certification message that this is received The certification message that the historical reception for the initiation time that information indicates arrives;
Determine there are historical reception to certification message in call number information indicate call number, less than this The call number that call number information in the certification message received indicates, and the historical reception to certification message in tune The initiation time shown with time information table, when being later than the initiation that the allocating time information in the certification message that this is received indicates Between when, the certification message for assert that this is received is illegal.
Optionally, this described certification message received further includes verification code information;The method also includes:
If it does not exist historical reception to certification message in the certification message that is received with this of call number information in Call number information indicate call number it is identical, and there is no historical reception to certification message in call number believe The call number indicated is ceased, the call number that the call number information in the certification message received less than this indicates, and should Historical reception to certification message in allocating time information indicate the initiation time, be later than in the certification message that this is received Initiation time for indicating of allocating time information, then judge that verification code information in certification message that this is received is tested with presetting Whether inconsistent demonstrate,prove code information;
When verification code information and preset verification code information in the certification message that this is received are inconsistent, this is assert The secondary certification message received is illegal.
Optionally, the method also includes:
If it does not exist historical reception to certification message in the certification message that is received with this of call number information in Call number information indicate call number it is identical, and there is no historical reception to certification message in call number believe The call number indicated is ceased, the call number that the call number information in the certification message received less than this indicates, and should Historical reception to certification message in allocating time information indicate the initiation time, be later than in the certification message that this is received Initiation time for indicating of allocating time information, and the verification code information in this certification message for receiving is tested with preset Card code information is consistent, then the certification message for assert that this is received is legal.
Optionally, the call number information indicates that this interface calling is that the calling originating end is called in this interface The initiation time corresponding period in, to the called terminal initiate which time call;
The method also includes:
If the call number in this certification message received, indicate that the certification message is that interface calls the initiation time Calling for the first time in the locating period, and verification code information and preset identifying code in this certification message for receiving Information is consistent, then the certification message for assert that this is received is legal.
The third aspect, the disclosure provide a kind of authentication device that interface calls, and described device is applied to call originating end, institute Stating device includes:
Generation module, for generating the certification message for calling called terminal interface, the certification message includes calling Number information, the call number information indicate that this interface calling is that the calling originating end is initiated to the called terminal Which time is called;
Sending module, for sending the certification message to the called terminal;
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;
The call number information for the called terminal determine historical reception to certification message in calling it is secondary Number information assert that this connects when identical as the call number that the call number information in the certification message that this is received indicates The certification message received is illegal.
Optionally, the certification message for calling originating end to send every time further includes the allocating time information that this is called, The allocating time information indicates the initiation time that this interface calls;
The allocating time information is used for, the called terminal determine historical reception to certification message in calling time The call number that information indicates is counted, the call number that the call number information in the certification message received less than this indicates, And the historical reception to certification message in allocating time information indicate the initiation time, be later than the certification that this is received and disappear When the initiation time that the allocating time information in breath indicates, the certification message for assert that this is received is illegal.
Optionally, described device includes:
Determining module, for determining that this connects before the certification message generated for calling called terminal interface Period locating for the initiation time that mouth calls;
The generation module is used for, and is generated the certification message for calling called terminal interface, is wrapped in the certification message The call number information included, for indicating that this interface calling is the calling originating end, in the initiation time Which time initiated in the locating period to the called terminal is called.
Optionally, described that the certification message that sends every time of originating end is called to further include the calling originating end and described adjusted With the default verification code information of end agreement;
The verification code information is determining the identifying code letter in the certification message that this is received for the called terminal Breath, when inconsistent with default verification code information, the certification message for assert that this is received is illegal.
Fourth aspect, the disclosure provide a kind of authentication device that interface calls, and described device is applied to called terminal, described Device includes:
Receiving module, for receiving the certification message for calling called terminal interface, the certification message includes calling Number information, it is that the call number information indicates that this interface calls for which for calling originating end to initiate to the called terminal Secondary calling;
Judgment module, for judge historical reception to certification message in call number information, received with this Whether identical authenticate the call number that the call number information in message indicates;
Determining module, for historical reception if it exists to certification message in call number information received with this The call number for authenticating the call number information expression in message is identical, then the certification message for assert that this is received is illegal.
Optionally, this described certification message received further includes allocating time information, the allocating time information table Show the initiation time that this interface calls;
The judgment module, for there is no historical reception to certification message in call number information connect with this When the call number that call number information in the certification message received indicates is identical, judges whether there is call number and be less than this The call number that call number information indicates in the secondary certification message received, and the initiation time is later than this certification received The certification message that the historical reception for the initiation time that allocating time information in message indicates arrives;
The determining module, for determine there are historical reception to certification message in call number information expression Call number, the call number that the call number information in the certification message received less than this indicates, and the historical reception To certification message in allocating time information indicate the initiation time, when being later than the calling in the certification message that this is received Between information indicate the initiation time when, the certification message for assert that this is received is illegal.
Optionally, this described certification message received further includes verification code information;
The judgment module, for there is no historical reception to certification message in call number information connect with this The call number that call number information in the certification message received indicates is identical, and there is no historical reception to certification disappear The call number that call number information in breath indicates, the call number information expression in the certification message received less than this Call number, and the historical reception to certification message in allocating time information indicate the initiation time, be later than this and connect When the initiation time that allocating time information in the certification message received indicates, testing in certification message that this is received is judged It demonstrate,proves code information and whether default verification code information is inconsistent;
The determining module, for the verification code information and preset identifying code letter in the certification message that this is received When ceasing inconsistent, the certification message for assert that this is received is illegal.
Optionally, the determining module, for there is no historical reception to certification message in call number information It is identical as the call number that the call number information in the certification message that this is received indicates, and there is no historical receptions to arrive Certification message in call number information indicate call number, the call number in certification message received less than this The call number that information indicates, and the historical reception to certification message in initiation time for indicating of allocating time information, it is late The initiation time that allocating time information in the certification message that this is received indicates, and this certification message for receiving In verification code information it is consistent with preset verification code information, then the certification message for assert that this is received is legal.
Optionally, the call number information indicates that this interface calling is that the calling originating end is called in this interface The initiation time corresponding period in, to the called terminal initiate which time call;
The determining module indicates the certification message for the call number in the certification message that this is received The calling for the first time initiated locating for the time in the period is called for interface, and the identifying code in this certification message for receiving When information is consistent with preset verification code information, the certification message for assert that this is received is legal.
5th aspect, the disclosure provide a kind of computer readable storage medium, are stored thereon with computer program, the program The step of any one of first aspect the method is realized when being executed by processor.
6th aspect, the disclosure provide a kind of electronic equipment, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize any one of first aspect institute The step of stating method.
7th aspect, the disclosure provide a kind of computer readable storage medium, are stored thereon with computer program, the program The step of any one of second aspect the method is realized when being executed by processor.
Eighth aspect, the disclosure provide a kind of electronic equipment, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize any one of power second aspect The step of the method.
Through the above scheme, called terminal can be indicated by comparing call number information in the certification message received Interface call number, if it is identical as the reception call number that the certification message that historical reception arrives indicates, to judge in rear reception Whether the certification message arrived is legal, to identify the certification message forwarded by criminal, improves the peace that interface calls certification Quan Xing.
Other feature and advantage of the disclosure will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is and to constitute part of specification for providing further understanding of the disclosure, with following tool Body embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 2 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 3 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 4 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 5 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 6 is the authentication device block diagram that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 7 is the authentication device block diagram that a kind of interface shown in one exemplary embodiment of the disclosure calls.
Fig. 8 is a kind of electronic equipment block diagram shown in one exemplary embodiment of the disclosure.
Specific embodiment
It is described in detail below in conjunction with specific embodiment of the attached drawing to the disclosure.It should be understood that this place is retouched The specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
Fig. 1 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls, the method Applied to calling originating end, which comprises
S11 generates the certification message for calling called terminal interface, and the certification message includes call number information, It is which time that the calling originating end is initiated to the called terminal is adjusted that the call number information, which indicates that this interface calls, With.
S12 sends the certification message to the called terminal.
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called.
The call number information for the called terminal determine historical reception to certification message in calling it is secondary Number information assert that this connects when identical as the call number that the call number information in the certification message that this is received indicates The certification message received is illegal.
Illustratively, call originating end when initiating the 1st interface calling, it is corresponding to authenticate the call number carried in message The 1st interface that information indicates calls;Call originating end when initiating the 2nd interface calling, corresponding authenticate carries in message Call number information indicate the 2nd interface call, and so on.
If being called after receiving the certification message that a carrying call number information indicates that the 1st interface calls, and receive The certification message that the 1st interface calls, the tune in certification message received due to after are indicated to a carrying call number information With number information, call number information with the certification message that formerly receives corresponds to identical 1st interface and calls, Then assert illegal in the certification message for being followed by being subject to.
It is worth noting that legal certification message from calling originating end to called terminal during sending, it is possible It can be intercepted by criminal, then be transmitted to called terminal again.Compared to legal certification message, through recognizing for criminal's forwarding Demonstrate,prove the delay in message having time, that is to say, that the certification message of criminal's forwarding is sent compared to legal calling originating end Message is authenticated in rear arrival called terminal.
Through the above scheme, called terminal can be indicated by comparing call number information in the certification message received Interface call number, if it is identical as the reception call number that the certification message that historical reception arrives indicates, to judge in rear reception Whether the certification message arrived is legal, to identify the certification message forwarded by criminal, improves the peace that interface calls certification Quan Xing.
Fig. 2 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls, the method Applied to calling originating end, which comprises
S21 generates the certification message for calling called terminal interface, and the certification message includes call number information, This allocating time information called, wherein the call number information indicates that this interface calling is the calling originating end Which time initiated to the called terminal is called, and the allocating time information indicates the initiation time that this interface calls.
S22 sends the certification message to the called terminal.
Wherein, the certification message for calling originating end to send every time includes call number information and the institute that this is called State allocating time information.
The call number information for the called terminal determine historical reception to certification message in calling it is secondary Number information assert that this connects when identical as the call number that the call number information in the certification message that this is received indicates The certification message received is illegal.
The allocating time information is used for, the called terminal determine historical reception to certification message in calling time The call number that information indicates is counted, the call number that the call number information in the certification message received less than this indicates, And the historical reception to certification message in allocating time information indicate the initiation time, be later than the certification that this is received and disappear When the initiation time that the allocating time information in breath indicates, the certification message for assert that this is received is illegal.
Illustratively, call originating end when initiating the 1st interface calling, it is corresponding to authenticate the call number carried in message The 1st interface that information indicates calls;Call originating end when initiating the 2nd interface calling, corresponding authenticate carries in message Call number information indicate the 2nd interface call, and so on.
If being called after receiving the certification message that a carrying call number information indicates that the 1st interface calls, and receive The certification message that the 1st interface calls, the tune in certification message received due to after are indicated to a carrying call number information With number information, call number information with the certification message that formerly receives corresponds to identical 1st interface and calls, Then assert illegal in the certification message for being followed by being subject to.
It is worth noting that legal certification message from calling originating end to called terminal during sending, it is possible It can be intercepted by criminal, then be transmitted to called terminal again.Compared to legal certification message, through recognizing for criminal's forwarding Demonstrate,prove the delay in message having time, that is to say, that the certification message of criminal's forwarding is sent compared to legal calling originating end Message is authenticated in rear arrival called terminal.
Through the above scheme, called terminal can be indicated by comparing call number information in the certification message received Interface call number, if it is identical as the reception call number that the certification message that historical reception arrives indicates, to judge in rear reception Whether the certification message arrived is legal, to identify the certification message forwarded by criminal, improves the peace that interface calls certification Quan Xing.
Illustratively, call originating end when initiating the 1st interface calling, it is corresponding to authenticate the call number carried in message The 1st interface that information indicates calls, corresponding for authenticating the allocating time information carried in message and indicating the initiation of 14:00 1 time interface calls;Call originating end when initiating the 2nd interface calling, it is corresponding to authenticate the call number letter carried in message The 2nd interface that breath indicates calls, corresponding the 2nd for authenticating the allocating time information carried in message and indicating the initiation of 15:00 Secondary interface calls, and so on.
If the called carrying call number information and allocating time information of receiving indicates to connect for the 2nd time that 15:00 is initiated After the certification message that mouth calls, and receive the 3rd of a carrying call number information and the expression 14:30 initiation of allocating time information The certification message that secondary interface calls, the call number of the call number information expression in the certification message received due to after, greatly The call number that call number information in the certification message formerly received indicates, still, after the certification message that receives In allocating time information indicate allocating time, earlier than in the certification message formerly received allocating time information expression Allocating time is then assert illegal in the certification message for being followed by being subject to.
It is worth noting that when originating end being called to send certification message every time, the corresponding call number of call number information Sequentially increase with the corresponding allocating time of allocating time information.The generation method that criminal may imitate certification message generates Illegal certification message.If illegally authenticating message call number information therein and allocating time information and not according to legal calling The calling of originating end initiates time and call number sequence, then the illegal certification message can be identified with called terminal, be mentioned as a result, High interface calls the safety of certification.
Similar, it is based on identical inventive concept, if the called terminal is in the certification message for determining that historical reception arrives In the call number that indicates of call number information, call number information expression in the certification message received greater than this Call number, and the historical reception to certification message in allocating time information indicate the initiation time, be less than this reception To certification message in allocating time information indicate the initiation time when, also it can be assumed that this certification message for receiving not It is legal.
In another optional embodiment, before certification message of the generation for calling called terminal interface, The described method includes: determining the period locating for the initiation time of this interface calling;The generation is for calling called terminal The certification message of interface, comprising: generate the certification message for calling called terminal interface, the institute for including in the certification message Call number information is stated, for indicating that this interface calling is the calling originating end, locating for the initiation time Which time initiated in period to the called terminal is called.
It is worth noting that calling originating end that can reset and adjust at the end of each period according to the division of period With number information, to clear up memory space, the mistake amount of data information when reducing high-frequency calling interface.Illustratively, the time Section daily calculate, generate authenticate message when certification message in call number information, i.e., for indicate daily 00:00 extremely In this period of 24:00, which corresponding time is called.
In addition, described call the certification message that sends every time of originating end to further include the callings originating end and described be called Hold the default verification code information of agreement;The verification code information disappears for the called terminal in the certification for determining that this is received Verification code information in breath, when inconsistent with default verification code information, the certification message for assert that this is received is illegal.
Exemplary, current slot is 00:00 to 24:00 on July 6th, 2018, and the calling originating end was on the same day (2018 On July 6) 16:10 is based on allocating time ts=when initiating interface call request to the called terminal the 1st time 201807061610 (corresponding 16:10 on July 6th, 2018) and call number count=1, and the identifying code made an appointment Unicode, and the first certification message is generated according to the encryption of md5 encryption rule.
In same day 16:15, if interface call request next time need to be initiated, it is based on allocating time ts=201807061615 (corresponding 16:15 on July 6th, 2018) and call number count=2, and the identifying code unicode to make an appointment, and according to The encryption of md5 encryption rule generates the second certification message.
In same day 18:20, if interface call request next time need to be initiated, it is based on allocating time ts=201807061820 (corresponding 18:20 on July 6th, 2018) and call number count=3, and the identifying code unicode to make an appointment, and according to The encryption of md5 encryption rule generates third and authenticates message.
To sum up, the call number information carried in the certification message that legal calling originating end is sent every time is all different , criminal intercepts certification message and forwards again, or generates counterfeit certification message based on corresponding rule, by called It holds the difficulty of verifying bigger, thus improves the safety of interface calling.
Fig. 3 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls, the method Applied to called terminal, which comprises
S31 receives the certification message for calling called terminal interface, and the certification message includes call number information, It is which time for calling originating end to initiate to the called terminal is called that the call number information, which indicates that this interface calls,.
S32, judge historical reception to certification message in call number information, in the certification message received with this Call number information indicate call number it is whether identical.
S33, if it exists historical reception to certification message in the certification message that is received with this of call number information In call number information indicate call number it is identical, then the certification message for assert that this is received is illegal.
Illustratively, call originating end when initiating the 1st interface calling, it is corresponding to authenticate the call number carried in message The 1st interface that information indicates calls;Call originating end when initiating the 2nd interface calling, corresponding authenticate carries in message Call number information indicate the 2nd interface call, and so on.
If being called after receiving the certification message that a carrying call number information indicates that the 1st interface calls, and receive The certification message that the 1st interface calls, the tune in certification message received due to after are indicated to a carrying call number information With number information, call number information with the certification message that formerly receives corresponds to identical 1st interface and calls, Then assert illegal in the certification message for being followed by being subject to.
It is worth noting that legal certification message from calling originating end to called terminal during sending, it is possible It can be intercepted by criminal, then be transmitted to called terminal again.Compared to legal certification message, through recognizing for criminal's forwarding Demonstrate,prove the delay in message having time, that is to say, that the certification message of criminal's forwarding is sent compared to legal calling originating end Message is authenticated in rear arrival called terminal.
Through the above scheme, called terminal can be indicated by comparing call number information in the certification message received Interface call number, if it is identical as the reception call number that the certification message that historical reception arrives indicates, to judge in rear reception Whether the certification message arrived is legal, to identify the certification message forwarded by criminal, improves the peace that interface calls certification Quan Xing.
Fig. 4 is the authentication method flow chart that a kind of interface shown in one exemplary embodiment of the disclosure calls, the method Applied to called terminal, which comprises
S41, receives the certification message for calling called terminal interface, the certification message include call number information and Allocating time information and verification code information, the call number information indicate that this interface calling is to call originating end to institute Which time for stating called terminal initiation is called, and the allocating time information indicates the initiation time that this interface calls, described to test Card code information is that the called terminal is made an appointment with originating end is called.
S42, judge historical reception to certification message in call number information, in the certification message received with this Call number information indicate call number it is whether identical.
If it exists historical reception to certification message in the certification message that is received with this of call number information in The call number that call number information indicates is identical, thens follow the steps S43 (i.e. "Yes" path in respective figure).It goes through if it does not exist Call number information in the certification message that the call number information in certification message that history receives is received with this indicates Call number it is identical, then follow the steps S44 (i.e. "No" path in respective figure).
S43, the certification message for assert that this is received are illegal.
S44 then judges whether there is call number and is less than call number information expression in the certification message that this is received Call number, and that initiates that the time is later than the expression of allocating time information in the certification message that this is received initiates the time The certification message that historical reception arrives.
Determine there are historical reception to certification message in call number information indicate call number, less than this The call number that call number information in the certification message received indicates, and the historical reception to certification message in tune The initiation time shown with time information table, when being later than the initiation that the allocating time information in the certification message that this is received indicates Between when, then follow the steps S43 (i.e. "Yes" path in respective figure).
Illustratively, call originating end when initiating the 1st interface calling, it is corresponding to authenticate the call number carried in message The 1st interface that information indicates calls, corresponding for authenticating the allocating time information carried in message and indicating the initiation of 14:00 1 time interface calls;Call originating end when initiating the 2nd interface calling, it is corresponding to authenticate the call number letter carried in message The 2nd interface that breath indicates calls, corresponding the 2nd for authenticating the allocating time information carried in message and indicating the initiation of 15:00 Secondary interface calls, and so on.
If the called carrying call number information and allocating time information of receiving indicates to connect for the 2nd time that 15:00 is initiated After the certification message that mouth calls, and receive the 3rd of a carrying call number information and the expression 14:30 initiation of allocating time information The certification message that secondary interface calls, the call number of the call number information expression in the certification message received due to after, greatly The call number that call number information in the certification message formerly received indicates, still, after the certification message that receives In allocating time information indicate allocating time, earlier than in the certification message formerly received allocating time information expression Allocating time is then assert illegal in the certification message for being followed by being subject to.
It is worth noting that when originating end being called to send certification message every time, the corresponding call number of call number information Sequentially increase with the corresponding allocating time of allocating time information.The generation method that criminal may imitate certification message generates Illegal certification message.If illegally authenticating message call number information therein and allocating time information and not according to legal calling The calling of originating end initiates time and call number sequence, then the illegal certification message can be identified with called terminal, be mentioned as a result, High interface calls the safety of certification.
Similar, it is based on identical inventive concept, if the called terminal is in the certification message for determining that historical reception arrives In the call number that indicates of call number information, call number information expression in the certification message received greater than this Call number, and the historical reception to certification message in allocating time information indicate the initiation time, be less than this reception To certification message in allocating time information indicate the initiation time when, also it can be assumed that this certification message for receiving not It is legal.
If it does not exist historical reception to certification message in the certification message that is received with this of call number information in Call number information indicate call number it is identical, and there is no historical reception to certification message in call number believe The call number indicated is ceased, the call number that the call number information in the certification message received less than this indicates, and should Historical reception to certification message in allocating time information indicate the initiation time, be later than in the certification message that this is received Allocating time information indicate the initiation time, then follow the steps S45 (i.e. "No" path in respective figure).
S45 judges whether verification code information in certification message that this is received and default verification code information are inconsistent.
When verification code information and preset verification code information in the certification message that this is received are inconsistent, then execute Step S43 (i.e. "Yes" path in respective figure).Verification code information and preset verifying in this certification message received Code information is consistent, thens follow the steps S46 (i.e. "No" path in respective figure).
S46, the certification message for assert that this is received are legal.
In addition, in another optional embodiment, in the certification message generated for calling called terminal interface Before, which comprises determine the period locating for the initiation time of this interface calling;Described generate is adjusted for calling With the certification message of end interface, comprising: generate the certification message for calling called terminal interface, include in the certification message The call number information, for indicating that this interface calling is the calling originating end, in the initiation time institute Which time initiated in the period at place to the called terminal is called.
It is worth noting that calling originating end that can reset and adjust at the end of each period according to the division of period With number information, to clear up memory space, the mistake amount of data information when reducing high-frequency calling interface.Illustratively, the time Section daily calculate, generate authenticate message when certification message in call number information, i.e., for indicate daily 00:00 extremely In this period of 24:00, which corresponding time is called.
Based on this, the method can also include the following steps, that is, if the calling time in this certification message for receiving Number indicates that the certification message is that interface calls the calling for the first time initiated in the period locating for the time, and this is received Certification message in verification code information it is consistent with preset verification code information, then assert that the certification message that this receives is closed Method.
To sum up, the call number information carried in the certification message that legal calling originating end is sent every time is all different , criminal intercepts certification message and forwards again, or generates counterfeit certification message based on corresponding rule, by called It holds the difficulty of verifying bigger, thus improves the safety of interface calling.
In the following, calling the specific embodiment of authentication method to carry out a kind of interface by the exemplary embodiment provided Detailed description.
Call originating end to called terminal send certification message, wherein the certification message be based on following information according to What preset encryption rule generated: the allocating time information of this interface call request, call number information and identifying code.Its In, the identifying code is that the calling originating end and the called terminal are made an appointment;The call number information is used for table Show that this interface calling is the calling originating end in current slot, which time initiated to the called terminal is called.
Exemplary, current slot is 00:00 to 24:00 on July 6th, 2018, and the calling originating end was on the same day (2018 On July 6) 16:10 is based on allocating time ts=when initiating interface call request to the called terminal the 1st time 201807061610 (corresponding 16:10 on July 6th, 2018) and call number count=1, and the identifying code made an appointment Unicode, and the first certification message is generated according to the encryption of md5 encryption rule.
In same day 16:15, if interface call request next time need to be initiated, it is based on allocating time ts=201807061615 (corresponding 16:15 on July 6th, 2018) and call number count=2, and the identifying code unicode to make an appointment, and according to The encryption of md5 encryption rule generates the second certification message.
In same day 18:20, if interface call request next time need to be initiated, it is based on allocating time ts=201807061820 (corresponding 18:20 on July 6th, 2018) and call number count=3, and the identifying code unicode to make an appointment, and according to The encryption of md5 encryption rule generates third and authenticates message.
In called terminal Zhong You sequential storage area and memory block in advance.Wherein, it is suitable to be stored with called terminal for sequential storage area The sequence allocating time TS of the certification message received for the last time in the certification message that sequence receives, sequence call number COUNT. Allocating time and call number that called terminal is not received sequentially each certification message are stored in memory block in advance.
When each period starts, the sequence allocating time and sequence call number are cleared.For example, at 2018 7 When No. 6 this period of 00:00 to 24:00 of the moon start, sequence allocating time TS is assigned 201807060000, and sequence is called Number COUNT is assigned 0.
As shown in figure 5, when called terminal receives a certification message, according to preset decoding rule to the certification message solution Code, and extract the allocating time ts carried in the certification message and call number count and identifying code unicode.
Firstly, called terminal judges whether the allocating time ts authenticated in message is later than current sequence allocating time TS.
The corresponding call number of call number information for the certification message being received sequentially due to called terminal be it is continuous, Disappear that is, receiving the allocating time authenticated in message after and should not be later than the certification that called terminal history is received sequentially The allocating time of the maximum certification message of call number in breath.Correspondingly, if the allocating time ts corresponding time be not later than it is suitable Sequence allocating time TS (path of corresponding "No"), then this certification message received is illegal certification message, that is, recognize Card failure.
Further, if the corresponding allocating time of allocating time ts is later than the (road of corresponding "Yes" sequence allocating time TS Diameter), judge whether call number count has existed in area in advance.
At this point, the certification message can if call number count has existed (path of corresponding "Yes") in area in advance Can be retransmited after being forwarded by criminal, therefore, which is illegal certification message, that is, authentification failure.
If call number count does not have (path of corresponding "No") in area in advance, further, the calling time is judged Whether number count is greater than sequence call number COUNT;If the call number is not more than sequence call number COUNT, judge Whether the certification message corresponds to the 1st calling for calling originating end subsequent time period to send.
It is worth noting that there are two kinds if call number count is not more than sequence area call number COUNT Situation, it may be possible to the certification message is the certification message that criminal sends, wherein call number count be received sequentially The call number for authenticating message repeats;It is also likely to be the time point before and after period switching, it is legal to call recognizing for originating end transmission Demonstrate,prove message.
If call number count is not more than sequence call number COUNT, also, the corresponding calling of the certification message The 1st calling (path of corresponding "No") that originating end subsequent time period is sent, then then judge that the certification message is illegal, That is, authentification failure.
If the certification message is that call number count is greater than sequence call number COUNT or the certification message is corresponding (path of corresponding "Yes") is called in the 1st time for calling originating end subsequent time period to send, and further, is then based on preset decryption Rule judges whether closed by the resulting password value secret of MD5 allocating time ts, call number count and identifying code unicode Method, that is, whether verification secret=MD5 (ts+count+unicode) meets preset condition.
If check results are unsatisfactory for preset condition (path of corresponding "No"), assert that the certification message is illegal, that is, Authentification failure.
If check results meet preset condition (path of corresponding "Yes"), further, judge that call number count is It is no be equal to current order call number COUNT add 1, that is, judgement " count=COUNT+1? ".
If count is not equal to COUNT+1 (path of corresponding "No"), by the corresponding call number of certification message Count and allocating time ts (<count, ts>) are inserted in the list of memory block in advance, and assert that the certification message is legal, That is, authenticating successfully.
If count is equal to COUNT+1 (path of corresponding "Yes"), searched in memory block in advance, if there are one to mention Before the call number count (min) of certification message that receives be equal to count+1, if it does not exist, then by sequential storage area Sequence call number COUNT and sequence allocating time TS value, be updated to the calling for the certification message that this is received respectively Number count and allocating time ts, and assert and authenticate successfully.
The call number count (min) of the certification message received in advance if there is one is equal to count+1, in advance In memory block on the basis of call number count (min), continuous maximum call number count (max) is searched for backward, and Regard the continuous maximum call number count (max) and its corresponding allocating time ts (max) as return value, then it will be suitable The value of sequence call number COUNT and sequence allocating time TS in sequence memory block are updated to the continuous maximum calling respectively Number count (max) and its corresponding allocating time ts (max), and assert and authenticate successfully.
It is searched for backward less than continuous maximum call number count (max), then called the sequence in sequential storage area secondary The value of number COUNT and sequence allocating time TS, are updated to call number count (min) and its corresponding allocating time respectively Ts (min), and assert and authenticate successfully.
In addition, after returning to updated value, it will can also store in advance, the calling before call number count (max) Allocating time before number and allocating time ts (max) is removed, to save the memory space for shifting to an earlier date memory block.
In addition, called terminal can also remove the caching for shifting to an earlier date memory block when each new period starts, to save The memory space of memory block in advance.
Illustratively, when receiving the first certification message, by the corresponding MD5 decryption rule decryption information, and from In extract allocating time ts=201807061610 and call number count=1 and identifying code unicode.Due to being this It is the first time interface call request in current slot that it is corresponding, which to authenticate message, has no other certification message before this, It is therefore contemplated that the first certification message is received sequentially.
Further, if the unicode in the first certification message is verified, by what is extracted from when the first certification message It initiates temporal information ts=201807061610 and is assigned to TS, call number information count=1 is assigned to COUNT.In this way, When order buffer area current cache has the sequence of the certification message received for the last time in the certification message being received sequentially to call Between TS=201807061610, sequence call number COUNT=1.
The case where receiving certification message for sequence, if called terminal first receives the first certification message, due to suitable The initiation time of the certification message received for the last time in the certification message of maximum storage being received sequentially in sequence memory block It is updated to the parameter of the first certification message, that is, TS=201807061610, call number are similarly updated, that is, COUNT =1.
When receiving the second certification message again, it is decrypted according to MD5 decryption rule, extracts the initiation temporal information ts of carrying =201807061615 (corresponding 16:15 on July 6th, 2018) and call number information count=2, and what is made an appointment are tested Demonstrate,prove code unicode.The call number information count=2 extracted from the second certification message, by parameter count and parameter COUNT It compares, can determine that the second certification message is that sequence interface arrives.
If the unicode in the second certification message is verified, then more by the sequence allocating time TS in sequential storage area The new initiation temporal information ts=201807061615 called for second interface, at this point, TS=201807061615;It so will be suitable The sequence call number COUNT of sequence memory block is updated to the call number information count=2 of second interface calling, at this point, COUNT=2.
That is, if called terminal sequence interface to certification message, with what is carried in the certification message finally reached Initiate time and call number, the sequence allocating time TS and sequence call number COUNT of update sequence memory block.
It is worth noting that indirect when due to the sending of first time interface call request and second of interface call request Closely, message high concurrent reaches the called terminal, in fact it could happen that the certification message sent more afterwards first reaches the called terminal Situation, that is, called terminal is not received sequentially certification message.
If called terminal does not receive the first certification message, and first receives the second certification message.Receiving It is decrypted according to MD5 decryption rule after two certification message, the initiation temporal information ts=201807061615 for extracting carrying is (right Answer 16:15 on July 6th, 2018) and call number information count=2, and the identifying code unicode to make an appointment.
Due to the certification received for the last time in the certification message of maximum storage being received sequentially in sequential storage area The sequence allocating time TS=201807060000 of message, sequence call number COUNT=0.It is extracted from the second certification message Call number information count=2, parameter count and parameter COUNT are compared, can determine this second certification message be not Sequence interface arrives.
If the unicode in the second certification message is verified, then second is authenticated the initiation temporal information in message Ts=201807061615 (corresponding 16:15 on July 6th, 2018) and call number information count=2 is stored to storing in advance Area.
Further, called terminal does not receive the first certification message and receives after receiving the second certification message Third authenticates message.Similarly, if the unicode in third certification message is verified, third is authenticated into the initiation in message Temporal information ts=201807061820 (corresponding 18:20 on July 6th, 2018) and call number information count=3 is stored to mentioning Preceding memory block.
That is, if when the non-sequence interface of called terminal to message is authenticated, keeps the sequence calling in sequential storage area Between TS and sequence call number COUNT it is constant, and by not sequence reach certification message in initiation temporal information ts and calling Number information count is stored to memory block in advance.
Further, called terminal receives another certification after receiving the second certification message and third certification message Message.When it is implemented, called terminal is by another certification message if unicode in another certification message is verified Call number information count compared with the smallest call number information count (min) that memory block in advance stores, if meet Count (min)=count+1 condition, then with the calling of the corresponding certification message of the call number information count (min) Number information count (min) is starting point, finds maximum calling time in the continuous certification message stored in memory block in advance backward Number information count (max), and with the maximum call number information count (max) corresponding certification message correspondence initiate the time with Call number, sequence allocating time TS and sequence call number COUNT in update sequence memory block.
Corresponding above-described embodiment, the smallest call number information count (min)=2 of memory block storage in advance, that is, The call number of second certification message finds memory block in advance if another certification message is the first certification message backward Maximum call number information count (max)=3 in the continuous certification message of middle storage.Further, message is authenticated with third Call number and initiate the time with the sequence allocating time TS and sequence call number COUNT in new sequences memory block, update Sequence allocating time TS=201807061820 (corresponding 18:20 on July 6th, 2018) afterwards, updated sequence call number COUNT=3.
It is worth noting that by the legal legal certification message for calling originating end to issue benefit may be intercepted by hacker With generating illegal certification message, and initiate illegal interface to called terminal and call.
In the scheme of the embodiment of the present disclosure, the certification message for calling originating end to initiate is based on initiation time, calling time Several and preset identifying code unicode is generated by the encryption of preset encryption rule.Correspondingly, called terminal need to judge to receive To certification message in the initiation time, whether call number and preset identifying code unicode meet the condition by verifying.
Called terminal authenticates message in response to receiving, and judges whether the initiation time in certification message is less than the sequence of storage Allocating time, if the time of initiating in certification message is less than the sequence allocating time stored, it is determined that the certification message is not It is legal.
It it is worth noting that originating end is called to generate the call number in certification message, is sequentially arranged according to the initiation time Sequence.It is stored with the sequence allocating time in substantial called terminal, when showing that sequence calling has been received in called terminal Between all legitimate authentication message before the corresponding and sequence allocating time.If the initiation of the certification message newly received Time is less than the sequence allocating time, then the certification message may be to be forged by hacker.
Further, if authenticating sequence allocating time of the initiation time in message not less than storage, described in judgement Authenticate the call number of message, if be present in the call number of the stored certification message reached in advance.If described The call number for authenticating message, is present in the call number of the stored certification message reached in advance, then recognizes described in judgement It is illegal to demonstrate,prove message.
It is worth noting that hacker may steal certification message, and it is sent to called terminal again.In this case, It is carried and legitimate authentication message consistent initiation time and call number in illegal certification message via hacker's forwarding.By In the time delay of message forwarding, legal certification message has actually reached called terminal prior to illegal certification message, also, The corresponding initiation time of the legal certification message and call number have also been stored in advance in called terminal.Therefore, if by adjusting The corresponding call number of a certification message newly received, the tune with the stored certification message reached in advance are detected with end It is consistent with number, it is determined that the certification message newly received is illegal.
Further, if the call number of the certification message received does not exist in the stored certification reached in advance In the call number of message.Then judge whether the call number of the certification message is greater than sequence call number and (is received sequentially The corresponding maximum call number of certification message);And when the call number of the certification message is not more than sequence call number, Judge whether the certification message is the certification message for calling originating end to send in latter time period;If the certification message is not It is the certification message for calling originating end to send in latter time period, then then determining that the certification message received is illegal.
It is worth noting that calling originating end that can count again in the call number that subsequent time period carries certification message Number.For example, current slot be 00:00 to 24:00 on July 6th, 2018, call number with interface call request the initiation time Sequence be sequentially ordered as 1/2/3/4 ..., subsequent time period is 00:00 to 24:00 on July 7th, 2018, and call number is with connecing The sequence of the initiation time of mouth call request is sequentially ordered as 1/2/3/4 again ....
Fig. 6 is the authentication device 600 that a kind of interface shown in one exemplary embodiment of the disclosure calls, described device 600 Applied to calling originating end, described device 600 includes:
Generation module 610, for generating the certification message for calling called terminal interface, the certification message includes adjusting With number information, the call number information indicates that this interface calling is that the calling originating end is initiated to the called terminal Which time call;
Sending module 620, for sending the certification message to the called terminal;
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;
The call number information for the called terminal determine historical reception to certification message in calling it is secondary Number information assert that this connects when identical as the call number that the call number information in the certification message that this is received indicates The certification message received is illegal.
Optionally, the certification message for calling originating end to send every time further includes the allocating time information that this is called, The allocating time information indicates the initiation time that this interface calls;
The allocating time information is used for, the called terminal determine historical reception to certification message in calling time The call number that information indicates is counted, the call number that the call number information in the certification message received less than this indicates, And the historical reception to certification message in allocating time information indicate the initiation time, be later than the certification that this is received and disappear When the initiation time that the allocating time information in breath indicates, the certification message for assert that this is received is illegal.
Optionally, described device 600 includes:
Determining module, for determining that this connects before the certification message generated for calling called terminal interface Period locating for the initiation time that mouth calls;
The generation module is used for, and is generated the certification message for calling called terminal interface, is wrapped in the certification message The call number information included, for indicating that this interface calling is the calling originating end, in the initiation time Which time initiated in the locating period to the called terminal is called.
Optionally, described that the certification message that sends every time of originating end is called to further include the calling originating end and described adjusted With the default verification code information of end agreement;
The verification code information is determining the identifying code letter in the certification message that this is received for the called terminal Breath, when inconsistent with default verification code information, the certification message for assert that this is received is illegal.
Fig. 7 is the authentication device 700 that a kind of interface shown in one exemplary embodiment of the disclosure calls, described device 700 Applied to called terminal, described device 700 includes:
Receiving module 710, for receiving the certification message for calling called terminal interface, the certification message includes adjusting With number information, it is call originating end to initiate to the called terminal that the call number information, which indicates that this interface calls, It calls several times;
Judgment module 720, for judge historical reception to certification message in call number information, received with this Certification message in call number information indicate call number it is whether identical;
Determining module 730, for historical reception if it exists to certification message in call number information and this reception To certification message in call number information indicate call number it is identical, then the certification message for assert that this is received does not conform to Method.
Optionally, this described certification message received further includes allocating time information, the allocating time information table Show the initiation time that this interface calls;
The judgment module 720, for there is no historical reception to certification message in call number information with When the call number that call number information in the secondary certification message received indicates is identical, it is small to judge whether there is call number The call number that call number information indicates in the certification message that this is received, and the initiation time is later than what this was received The certification message that the historical reception for the initiation time that allocating time information in certification message indicates arrives;
The determining module 730, for determine there are historical reception to certification message in call number information table The call number shown, the call number that the call number information in the certification message received less than this indicates, and the history The initiation time that allocating time information in the certification message received indicates, the tune being later than in the certification message that this is received When the initiation time shown with time information table, the certification message for assert that this is received is illegal.
Optionally, this described certification message received further includes verification code information;
The judgment module 720, for there is no historical reception to certification message in call number information with The call number that call number information in the secondary certification message received indicates is identical, and there is no historical reception to recognize Demonstrate,prove the call number that the call number information in message indicates, the call number information in certification message received less than this The call number of expression, and the historical reception to certification message in initiation time for indicating of allocating time information, be later than this When the initiation time that allocating time information in the secondary certification message received indicates, judge in certification message that this is received Verification code information and default verification code information it is whether inconsistent;
The determining module 730, for the verification code information and preset verifying in the certification message that this is received When code information is inconsistent, the certification message for assert that this is received is illegal.
Optionally, the determining module 730, for there is no historical reception to certification message in call number believe Breath is identical as the call number that the call number information in the certification message that this is received indicates, and historical reception is not present To certification message in the call number that indicates of call number information, the calling in certification message received less than this is secondary Number information indicate call number, and the historical reception to certification message in allocating time information expression the initiation time, It is later than the initiation time that the allocating time information in the certification message that this is received indicates, and this certification received disappears Verification code information in breath is consistent with preset verification code information, then the certification message for assert that this is received is legal.
Optionally, the call number information indicates that this interface calling is that the calling originating end is called in this interface The initiation time corresponding period in, to the called terminal initiate which time call;
The determining module 730 indicates that the certification disappears for the call number in the certification message that this is received Breath is that interface calls the calling for the first time initiated locating for the time in the period, and the verifying in this certification message for receiving When code information is consistent with preset verification code information, the certification message for assert that this is received is legal.
Through the above scheme, called terminal can be indicated by comparing call number information in the certification message received Interface call number, if it is identical as the reception call number that the certification message that historical reception arrives indicates, to judge in rear reception Whether the certification message arrived is legal, to identify the certification message forwarded by criminal, improves the peace that interface calls certification Quan Xing.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
The disclosure provides a kind of computer readable storage medium, is stored thereon with computer program, and the program is by processor The step of authentication method that the interface for being applied to call originating end calls is realized when execution.
The disclosure provides a kind of electronic equipment, comprising:
Memory is stored thereon with computer program;
Processor is applied to call originating end for executing the computer program in the memory to realize The step of authentication method that interface calls.
The disclosure provides a kind of computer readable storage medium, is stored thereon with computer program, and the program is by processor The step of being applied to the authentication method that called terminal interface calls is realized when execution.
The disclosure provides a kind of electronic equipment, comprising:
Memory is stored thereon with computer program;
Processor is applied to called terminal interface for executing the computer program in the memory to realize The step of authentication method of calling.
Fig. 8 is the block diagram of a kind of electronic equipment 800 shown according to an exemplary embodiment.For example, electronic equipment 800 can To be provided as a server.Referring to Fig. 8, electronic equipment 800 includes processor 822, and quantity can be one or more, with And memory 832, for storing the computer program that can be executed by processor 822.The computer program stored in memory 832 May include it is one or more each correspond to one group of instruction module.In addition, processor 822 can be configured as The computer program is executed, is adjusted to execute the authentication method of the interface for being applied to call originating end calling or applied to calling The authentication method called with the interface at end.
In addition, electronic equipment 800 can also include power supply module 826 and communication component 850, which can be with It is configured as executing the power management of electronic equipment 800, which, which can be configured as, realizes electronic equipment 800 Communication, for example, wired or wireless communication.In addition, the electronic equipment 800 can also include input/output (I/O) interface 858.Electricity Sub- equipment 800 can be operated based on the operating system for being stored in memory 832, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it should The step of authentication method that above-mentioned interface calls is realized when program instruction is executed by processor.For example, this computer-readable is deposited Storage media can be the above-mentioned memory 832 including program instruction, and above procedure instruction can be by the processor of electronic equipment 800 822 execute to complete the above-mentioned authentication method for being applied to that the interface of originating end is called to call or applied to calling called terminal The authentication method that interface calls.
The preferred embodiment of the disclosure is described in detail in conjunction with attached drawing above, still, the disclosure is not limited to above-mentioned reality The detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosure Monotropic type, these simple variants belong to the protection scope of the disclosure.
It is further to note that specific technical features described in the above specific embodiments, in not lance In the case where shield, can be combined in any appropriate way, in order to avoid unnecessary repetition, the disclosure to it is various can No further explanation will be given for the combination of energy.
In addition, any combination can also be carried out between a variety of different embodiments of the disclosure, as long as it is without prejudice to originally Disclosed thought equally should be considered as disclosure disclosure of that.

Claims (10)

1. the authentication method that a kind of interface calls, which is characterized in that the method is applied to call originating end, the method packet It includes:
The certification message for calling called terminal interface is generated, the certification message includes call number information, the calling It is which time that the calling originating end is initiated to the called terminal is called that number information, which indicates that this interface calls,;
The certification message is sent to the called terminal;
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;
The call number information for the called terminal determine historical reception to certification message in call number believe Breath assert that this is received when identical as the call number that the call number information in the certification message that this is received indicates Certification message it is illegal.
2. the method according to claim 1, wherein the method also includes:
The certification message for calling originating end to send every time further includes the allocating time information that this is called, the allocating time Information indicates the initiation time that this interface calls;
The allocating time information is used for, the called terminal determine historical reception to certification message in call number letter The call number indicated is ceased, the call number that the call number information in the certification message received less than this indicates, and should Historical reception to certification message in allocating time information indicate the initiation time, be later than in the certification message that this is received Allocating time information indicate the initiation time when, the certification message for assert that this is received is illegal.
3. the authentication method that a kind of interface calls, which is characterized in that the method is applied to called terminal, which comprises
The certification message for calling called terminal interface is received, the certification message includes call number information, the calling It is which time for calling originating end to initiate to the called terminal is called that number information, which indicates that this interface calls,;
Judge historical reception to certification message in call number information, the calling in certification message received with this time Whether the call number that number information indicates is identical;
If it exists historical reception to certification message in the certification message that is received with this of call number information in calling The call number that number information indicates is identical, then the certification message for assert that this is received is illegal.
4. according to the method described in claim 3, it is characterized in that, this described certification message received further includes when calling Between information, the allocating time information indicate this interface call the initiation time;
The method also includes:
If it does not exist historical reception to certification message in the certification message that is received with this of call number information in tune The call number indicated with number information is identical, then judges whether there is call number and be less than in the certification message that this is received The call number that call number information indicates, and the initiation time is later than the allocating time information in the certification message that this is received The certification message that the historical reception of the initiation time of expression arrives;
Determine there are historical reception to certification message in call number information indicate call number, be less than this receive To certification message in call number information indicate call number, and the historical reception to certification message in calling when Between information indicate the initiation time, be later than in the certification message that this is received allocating time information expression the initiation time When, the certification message for assert that this is received is illegal.
5. the authentication device that a kind of interface calls, which is characterized in that described device is applied to call originating end, described device packet It includes:
Generation module, for generating the certification message for calling called terminal interface, the certification message includes call number Information, the call number information indicate this interface call be it is described calling originating end initiated to the called terminal which Secondary calling;
Sending module, for sending the certification message to the called terminal;
Wherein, the certification message for calling originating end to send every time includes the call number information that this is called;
The call number information for the called terminal determine historical reception to certification message in call number believe Breath assert that this is received when identical as the call number that the call number information in the certification message that this is received indicates Certification message it is illegal.
6. the authentication device that a kind of interface calls, which is characterized in that described device is applied to called terminal, and described device includes:
Receiving module, for receiving the certification message for calling called terminal interface, the certification message includes call number Information, it is which time for calling originating end to initiate to the called terminal is adjusted that the call number information, which indicates that this interface calls, With;
Judgment module, for judge historical reception to certification message in call number information, the certification received with this Whether the call number that the call number information in message indicates is identical;
Determining module, for historical reception if it exists to certification message in the certification that is received with this of call number information The call number that call number information in message indicates is identical, then the certification message for assert that this is received is illegal.
7. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The step of any one of claim 1-2 the method is realized when row.
8. a kind of electronic equipment characterized by comprising
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 1-2 The step of method.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The step of any one of claim 3-4 the method is realized when row.
10. a kind of electronic equipment characterized by comprising
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in any one of claim 3-4 The step of method.
CN201810990921.5A 2018-08-28 2018-08-28 Authentication method and device for interface call, storage medium and electronic equipment Active CN109309667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810990921.5A CN109309667B (en) 2018-08-28 2018-08-28 Authentication method and device for interface call, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810990921.5A CN109309667B (en) 2018-08-28 2018-08-28 Authentication method and device for interface call, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN109309667A true CN109309667A (en) 2019-02-05
CN109309667B CN109309667B (en) 2021-08-13

Family

ID=65223870

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810990921.5A Active CN109309667B (en) 2018-08-28 2018-08-28 Authentication method and device for interface call, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN109309667B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499904A (en) * 2008-02-01 2009-08-05 华为技术有限公司 Method, apparatus and system for safe interface call
US8286219B2 (en) * 2008-02-16 2012-10-09 Xencare Software Inc. Safe and secure program execution framework
CN104780176A (en) * 2015-04-28 2015-07-15 中国科学院微电子研究所 Method and system for securely calling representational state transfer application programming interface
CN105634743A (en) * 2015-12-30 2016-06-01 中国银联股份有限公司 Authentication method used for open interface calling
CN106254537A (en) * 2016-09-22 2016-12-21 北京小米移动软件有限公司 Interface interchange method and apparatus
CN106302346A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 The safety certifying method of API Calls, device, system
CN106453519A (en) * 2016-09-21 2017-02-22 合网络技术(北京)有限公司 Interface call method and device
CN106850231A (en) * 2017-02-22 2017-06-13 济南浪潮高新科技投资发展有限公司 A kind of method of protection interface safety, service end and system, a kind of client
CN107135073A (en) * 2016-02-26 2017-09-05 北京京东尚科信息技术有限公司 Interface interchange method and apparatus
CN107704765A (en) * 2017-08-28 2018-02-16 深圳市诚壹科技有限公司 A kind of interface access method, server and computer-readable recording medium
CN107888656A (en) * 2017-10-09 2018-04-06 北京京东尚科信息技术有限公司 Service the call method and calling device of end interface

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499904A (en) * 2008-02-01 2009-08-05 华为技术有限公司 Method, apparatus and system for safe interface call
US8286219B2 (en) * 2008-02-16 2012-10-09 Xencare Software Inc. Safe and secure program execution framework
CN104780176A (en) * 2015-04-28 2015-07-15 中国科学院微电子研究所 Method and system for securely calling representational state transfer application programming interface
CN106302346A (en) * 2015-05-27 2017-01-04 阿里巴巴集团控股有限公司 The safety certifying method of API Calls, device, system
CN105634743A (en) * 2015-12-30 2016-06-01 中国银联股份有限公司 Authentication method used for open interface calling
CN107135073A (en) * 2016-02-26 2017-09-05 北京京东尚科信息技术有限公司 Interface interchange method and apparatus
CN106453519A (en) * 2016-09-21 2017-02-22 合网络技术(北京)有限公司 Interface call method and device
CN106254537A (en) * 2016-09-22 2016-12-21 北京小米移动软件有限公司 Interface interchange method and apparatus
CN106850231A (en) * 2017-02-22 2017-06-13 济南浪潮高新科技投资发展有限公司 A kind of method of protection interface safety, service end and system, a kind of client
CN107704765A (en) * 2017-08-28 2018-02-16 深圳市诚壹科技有限公司 A kind of interface access method, server and computer-readable recording medium
CN107888656A (en) * 2017-10-09 2018-04-06 北京京东尚科信息技术有限公司 Service the call method and calling device of end interface

Also Published As

Publication number Publication date
CN109309667B (en) 2021-08-13

Similar Documents

Publication Publication Date Title
US8255983B2 (en) Method and apparatus for email communication
CN104185176B (en) A kind of long-range initial method of Internet of Things virtual user identification module card and system
CN106330838B (en) A kind of dynamic signature method and the client and server using this method
CN102299930B (en) Method for ensuring security of client software
CN105187450A (en) Authentication method and device based on authentication equipment
CN109802835A (en) A kind of safety certifying method, system and API gateway
EP3709598A1 (en) Anti&#39;sim swapping fraud
US10291588B2 (en) Secure registration to a service provided by a web server
CN110113355A (en) The cut-in method and device in Internet of Things cloud
CN101378582A (en) User recognizing module, authentication center, authentication method and system
CN111010363B (en) Information authentication method and system, authentication module and user terminal
CN107911398B (en) Identity information authentication method, device and system
JP2013097650A (en) Authentication system, authentication method and authentication server
CN110311895A (en) Session authorization check method, system and the electronic equipment of identity-based verifying
CN113726524A (en) Secure communication method and communication system
CN111800276B (en) Service processing method and device
CN1894996A (en) Method and apparatus for authentication in wireless communications
CN113132317B (en) Identity authentication method, system and device
CN101090321B (en) Apparatus and method for discovering emulated clients using non-periodic precision measurements
US7650139B2 (en) Method for ensuring security of subscriber card
CN110365688A (en) Anti-stealing-link method and device
CN109981677A (en) A kind of credit management method and device
KR101243101B1 (en) Voice one-time password based user authentication method and system on smart phone
CN110944300B (en) Short message service system, forwarding interface device and defense server
CN109309667A (en) The authentication method and device, storage medium and electronic equipment that interface calls

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