Access content acquisition method, apparatus, device, and storage medium
By receiving and verifying the access identification information generated by the authorization code, the security authorization problem between financial institutions and third-party institutions is solved, ensuring that user information is not leaked during the online authorization process, and using encryption and asymmetric key signature verification technology to ensure security.
Patent Information
- Application Number
- CN202211433128.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-16
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-11-16
AI Technical Summary
In the online authorization process between financial institutions and third-party institutions, there is a lack of effective and secure authorization methods, which makes it easy for user information to be leaked when exposed to the outside world.
By receiving the authorization code of the first terminal device, access identification information is generated and verified. If the verification is successful, the access content is determined and returned according to the access request, and encryption algorithms such as 3DES encryption and asymmetric key signature verification are used to ensure security.
After solving the third-party security authorization problem, the user information is exposed to the outside without being leaked, ensuring the security and reliability of the interaction process.
Smart Images

Figure CN115996140B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information security, and particularly relates to an access content acquisition method and device, equipment and a storage medium. BACKGROUND
[0002] With the continuous promotion of financial ecological openness, more and more businesses begin to transform online, and traditional offline services cannot well meet the explosive era of traffic. In the current financial background, the "online + offline" mode has become the mainstream marketing mode of various financial institutions and banks.
[0003] After the establishment of a unified API opening platform by various banks, third-party institutions outside the bank only need to establish a third-party agreement relationship with the bank, and then the bank service can be called. However, at the same time, for some bank service resources with low confidentiality and security, there is a lack of an online authorization method to help more third-party institutions reduce the integration process.
[0004] Therefore, an access content acquisition method is needed, which can achieve the purpose of exposing user information without leaking after solving the problem of third-party security authorization. SUMMARY
[0005] The present application provides an access content acquisition method, device, equipment and storage medium, which can achieve the purpose of exposing user information without leaking after solving the problem of third-party security authorization.
[0006] In a first aspect, the present application provides an access content acquisition method, which comprises:
[0007] receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device;
[0008] generating access identification information according to the authorization code, and sending the access identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device;
[0009] receiving an access request and the access identification information sent by the first terminal device, verifying the access identification information, and obtaining a first verification result;
[0010] if the first verification result is passed, determining access content according to the access request and the access identification information, and returning the access content to the first terminal device.
[0011] In one example, the access identification information comprises user identification information, and the generating the access identification information according to the authorization code comprises:
[0012] obtaining an identifier of the user in the second terminal device, a name symbol of the first terminal device in the second terminal device, and a characteristic string according to the authorization code;
[0013] generating the user identification information according to the identifier, the name symbol, and the characteristic string according to a preset rule.
[0014] In one example, the generating the user identification information according to the identifier, the name symbol, and the characteristic string according to a preset rule comprises:
[0015] splicing the characteristic string and the name symbol in sequence to obtain a spliced string;
[0016] adding one character in the identifier to the spliced string at every interval of a preset position to obtain an added string;
[0017] arranging the added string in reverse order to obtain an arranged string;
[0018] encrypting the arranged string to generate the user identification information.
[0019] In one example, the access identification information comprises token information and a token time limit, and the verifying the access identification information to obtain a first verification result comprises:
[0020] verifying the token information according to a relationship between the token time limit and a first threshold to obtain a second verification result;
[0021] obtaining the first verification result according to the second verification result.
[0022] In one example, the access identification information comprises refresh token information, and the obtaining the first verification result according to the second verification result comprises:
[0023] if the second verification result is not passed, re-determining a third verification result according to a relationship between the refresh token information and a second threshold;
[0024] obtaining the first verification result according to the third verification result.
[0025] In one example, the determining the access content according to the access request and the access identification information comprises:
[0026] decrypting the access identification information to obtain the identifier;
[0027] According to the identifier, determine access content.
[0028] In one example, before receiving the authorization code sent by the first terminal device, the method further comprises:
[0029] Receiving a request message for the authorization code sent by the first terminal device;
[0030] According to the request message, sending the authorization code to the first terminal device.
[0031] In one example, the method further comprises:
[0032] Receiving a request message for the pre-authorization code sent by the first terminal device; wherein the pre-authorization code is used for verifying the first terminal device;
[0033] Verifying the pre-authorization code to obtain a fourth verification result;
[0034] If the fourth verification result is passed, sending the pre-authorization code to the first terminal device.
[0035] In one example, the method further comprises:
[0036] Receiving a login page associated with the pre-authorization code, and determining the authority of the login page;
[0037] If the authority of the login page meets a preset condition, returning the login page to the first terminal device.
[0038] In a second aspect, the application provides an access content obtaining device, the device comprising:
[0039] A first receiving unit for receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the authority to access a second terminal device;
[0040] A generating unit for generating access identification information according to the authorization code, and sending the access identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device;
[0041] A first verifying unit for receiving an access request and the access identification information sent by the first terminal device, verifying the access identification information, and obtaining a first verification result;
[0042] A determining unit for determining access content according to the access request and the access identification information if the first verification result is passed, and returning the access content to the first terminal device.
[0043] In a third aspect, the present application provides a terminal device, comprising: a processor, and a memory connected with the processor in communication;
[0044] The memory stores computer-executable instructions.
[0045] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect.
[0046] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method according to the first aspect.
[0047] In a fifth aspect, the present application provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the method according to the first aspect.
[0048] The present application provides an access content obtaining method, device, equipment and storage medium, by receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device; generating access identification information according to the authorization code, and sending the access identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device; receiving an access request and the access identification information sent by the first terminal device, verifying the access identification information to obtain a first verification result; if the first verification result is passed, determining access content according to the access request and the access identification information, and returning the access content to the first terminal device. By using the technical solution, the purpose of exposing user information to the outside without leaking can be achieved after solving the problem of third-party security authorization. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 is a flowchart of an access content obtaining method according to an embodiment of the present application;
[0051] Figure 2 is a flowchart of an access content obtaining method according to an embodiment of the present application;
[0052] Figure 3 is a flowchart of an access content obtaining method according to an embodiment of the present application;
[0053] Figure 4 is a structural schematic diagram of an access content acquisition device according to Embodiment Three of the present application;
[0054] Figure 5 is a structural schematic diagram of an access content acquisition device according to Embodiment Four of the present application;
[0055] Figure 6 is a block diagram of a terminal device according to an exemplary embodiment.
[0056] The specific embodiments of the present application have been shown and described in the above-mentioned drawings, and will be described in more detail hereinafter. These drawings and the written description are not intended to restrict the scope of the present application concept in any way, but to illustrate the present application concept to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0057] The exemplary embodiments will be described in detail herein below, with examples shown in the drawings. In the following description, the same numbers in different drawings represent the same or similar elements unless otherwise represented. The embodiments described in the following exemplary embodiments do not represent all the embodiments consistent with the present application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the present application, as detailed in the appended claims.
[0058] The access content acquisition method provided by the present application aims to solve the above technical problems of the prior art.
[0059] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes can not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.
[0060] Figure 1 is a flowchart of an access content acquisition method according to Embodiment One of the present application. Embodiment One includes the following steps:
[0061] S101, receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device.
[0062] In one example, the first terminal device is different from the second terminal device. The first terminal device accesses the second terminal device through an open platform of the second terminal device. The open platform is a software system that exposes its application programming interface or functions to allow external programs to add functionality or use resources of the software system without changing the source code of the software system. In the Internet era, a website encapsulates its services into a series of computer-recognizable data interfaces and exposes them to third-party developers. Through the open platform, the website can not only provide simple access to Web pages, but also perform complex data interactions, and convert its Web site into a development platform equivalent to an operating system. Third-party developers can develop a variety of applications based on these existing and open Web sites. The third-party developers are the first terminal devices in this embodiment.
[0063] The authorization code is an identification code issued by the second terminal device to the first terminal device, and the identification code is used to indicate that the first terminal device and the second terminal device can interact, and the second terminal device is a terminal device approved by the second terminal device.
[0064] S102, generating access identification information according to the authorization code, and sending the access identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device.
[0065] In this embodiment, the access identification information is issued by the second terminal device to the first terminal device, and the first terminal device can access the second terminal device according to the access identification information. The access identification information includes token information, token time limit, refresh token information, and user identification information.
[0066] S103, receiving the access request and the access identification information sent by the first terminal device, verifying the access identification information, and obtaining a first verification result.
[0067] In this embodiment, the access request is a request message for the first terminal device to access the second terminal device. In this embodiment, the first verification result is used to indicate the validity of the access identification information. The verification of the access identification information is to verify the token information, the token time limit, the refresh token information, and the user identification information respectively.
[0068] S104, if the first verification result is passed, determining the access content according to the access request and the access identification information, and returning the access content to the first terminal device.
[0069] In the embodiment, when the first verification result is passed, if the content of the access request is to access the user information in the second terminal device, the user information is searched in the second terminal device according to the access identification information, and the user information is returned to the first terminal device as the access content.
[0070] The application provides an access content obtaining method, which comprises the following steps: receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device; generating access identification information according to the authorization code and sending the access identification information to the first terminal device; wherein the access identification information is used to verify the first terminal device by the second terminal device; receiving an access request and the access identification information sent by the first terminal device, verifying the access identification information, and obtaining a first verification result; if the first verification result is passed, determining access content according to the access request and the access identification information, and returning the access content to the first terminal device. The technical scheme can realize the purpose of exposing user information to the outside without leaking the information after solving the problem of third-party security authorization.
[0071] Figure 2 Fig. 1 is a flowchart of an access content obtaining method according to the second embodiment of the application. The second embodiment comprises the following steps:
[0072] S201, receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device.
[0073] For example, the step can refer to the step S101 described above, and will not be repeated here.
[0074] S202, generating access identification information according to the authorization code and sending the access identification information to the first terminal device; wherein the access identification information is used to verify the first terminal device by the second terminal device.
[0075] For example, the step can refer to the step S102 described above, and will not be repeated here.
[0076] S203, the access identification information comprises user identification information, the identifier of the user in the second terminal device, the name symbol of the first terminal device in the second terminal device and a characteristic string are obtained according to the authorization code.
[0077] In this embodiment, the user identification information refers to identification information capable of representing the uniqueness of a user, wherein the user identification information is processed data information. When a user uses a second terminal device, the second terminal device assigns an identifier corresponding to the user to the user, and each user has a corresponding identifier in the second terminal device, and the data information of the user in the second terminal device can be determined according to the identifier, including but not limited to user information and account information.
[0078] Specifically, the name symbol of the first terminal device in the second terminal device refers to a name symbol that the first terminal device registers in the second terminal device in advance. For example, the first terminal device is A, and the name symbol of the first terminal device in the second terminal device is A. The feature string is an identifier representing a specific meaning, wherein the feature string can be a preset number of letters, symbols or numbers. In this embodiment, the number of bits of the identifier of the user in the second terminal device, the number of bits of the name symbol of the first terminal device in the second terminal device, and the number of bits of the feature string are fixed, wherein the number of bits of the identifier of the user in the second terminal device can be the same as or different from the number of bits of the name symbol of the first terminal device in the second terminal device. The number of bits of the name symbol of the first terminal device in the second terminal device can be the same as or different from the number of bits of the feature string.
[0079] S204, generating user identification information according to the identifier, the name symbol and the feature string according to a preset rule.
[0080] In this embodiment, the user identification information is generated by combining or reordering the characters in the identifier, the name symbol and the feature string according to the preset rule.
[0081] In this embodiment, the preset rule can be set in advance, and the preset rule listed in this embodiment is only used for illustration and does not mean that only one preset rule can be used to generate the user identification information.
[0082] In one example, the identifier, the name symbol and the feature string are combined to generate the user identification information according to the preset rule, including:
[0083] The feature string and the name symbol are spliced in order to obtain a spliced string;
[0084] A character in the identifier is added to the spliced string at every preset position to obtain an added string;
[0085] The added string is arranged in reverse order to obtain an arranged string;
[0086] The arranged string is encrypted to generate the user identification information.
[0087] In this embodiment, for example, if the characteristic character string is S and the name symbol is A, the characteristic character string S and the name symbol A are concatenated in order to obtain a concatenated character string a=S+A. In this embodiment, the preset positions of each interval can be every 3 positions, and the identifier can be X, then one bit of X is added every 3 positions to obtain an added character string b. The added character string b is arranged in reverse order, for example, if b is 12345, the arranged character string is 54321. In this embodiment, the arranged character string is encrypted, wherein the encryption algorithm can be 3DES. 3DES encryption is a symmetric encryption algorithm that is designed to solve the problem that the original DES encryption key length is easily brute-force cracked due to the increase in computer computing power. Since in this scenario, encryption and decryption are uniformly completed by the open platform, there is no scenario of key leakage, so it is a suitable and efficient encryption method.
[0088] S205. Send the access identification information to the first terminal device; wherein the access identification information is used by the second terminal device to verify the first terminal device.
[0089] For example, this step may refer to the above-mentioned step S102 and will not be described in detail.
[0090] S206: Receive the access request and access identification information sent by the first terminal device, verify the access identification information, and obtain a first verification result.
[0091] For example, this step may refer to the above-mentioned step S103 and will not be described in detail.
[0092] In one example, the access identification information includes token information and token time limit. The access identification information is verified to obtain a first verification result, including:
[0093] Verify the token information based on the relationship between the token time limit and the first threshold to obtain a second verification result;
[0094] According to the second verification result, the first verification result is obtained.
[0095] In this embodiment, the first threshold may be 3 days. If the token time limit is within 3 days, the second verification result is that the token information passes, and the first verification result is that the access identification information passes.
[0096] In one example, the access identification information includes refresh token information, and obtaining the first verification result based on the second verification result includes:
[0097] If the second verification result is failed, the third verification result is re-determined according to the relationship between the refresh token information and the second threshold; and the first verification result is obtained according to the third verification result.
[0098] In this embodiment, the token information and the refresh token information are a string of length not less than 32, ensuring that the token information of each authorization request is unique. The second threshold is the time limit for the refresh token information to be invalid. After the second threshold is exceeded, the token information and the refresh token information cannot be used again.
[0099] If the token time limit exceeds 3 days, it is determined that the second verification result is that the token information is not passed, the refresh token information is obtained, the time limit in the refresh token information is determined, and the relationship between the time limit of the refresh token information and the second threshold is determined. If the time limit in the refresh token information is less than the second threshold, the third verification result is that the refresh token information is passed, and it is determined that the first verification result is that the access identifier information is passed.
[0100] S207, if the first verification result is passed, the access content is determined according to the access request and the access identifier information, and the access content is returned to the first terminal device.
[0101] In one example, determining the access content according to the access request and the access identifier information comprises:
[0102] Decrypting the access identifier information to obtain an identifier, and determining the access content according to the identifier.
[0103] In this embodiment, the access identifier information is first decrypted by 3DES, and the identifier of the user in the second terminal device is determined according to the preset rule after obtaining the decryption result. According to the identifier, the access content is searched in the second terminal device.
[0104] In one example, before receiving the authorization code sent by the first terminal device, the method further comprises:
[0105] Receiving a request message of the authorization code sent by the first terminal device; and sending the authorization code to the first terminal device according to the request message.
[0106] In this embodiment, the authorization code is sent to the first terminal device after receiving the request message of the authorization code sent by the first terminal device through the OAuth authorization protocol.
[0107] In one example, the method further comprises:
[0108] Receiving a request message of the pre-authorization code sent by the first terminal device; wherein the pre-authorization code is used to verify the first terminal device;
[0109] Verifying the pre-authorization code to obtain a fourth verification result;
[0110] If the fourth verification result is passed, the pre-authorization code is sent to the first terminal device.
[0111] In the embodiment, the request message source of the first terminal device is ensured to be credible by adding the pre-authorization code. After the pre-authorization code is issued, authenticated and parsed on the gateway of the second terminal device, a user system page specified by the first terminal device is returned. The format of the pre-authorization code consists of the following three aspects: the first terminal device information, the transaction message signature value and the transaction timestamp. The first terminal device information should include the unique identifier ID of the first terminal device registered in the second terminal device, the URL address of the login page jump, and the scope of the authorization required for this request authorization.
[0112] In the embodiment, the process of verifying the pre-authorization code is as follows: by allowing the first terminal device to register the public key in the second terminal device and using the public and private key signature verification method in the interaction, it is ensured that the message will not be tampered with in the pre-authorization process. The role of asymmetric key signature verification: asymmetric key signature is an identity authentication and anti-fraud method, which generally signs the digest information. The scenario is roughly as follows: when the first terminal device and the second terminal device communicate, how does the second terminal device ensure that the data received from the first terminal device is sent by the first terminal device itself, rather than by a hacker disguised as the first terminal device, and how to determine whether it has been tampered with by a hacker. Here, signature and authentication are used to confirm the sender and whether the data has been tampered with. First, the first terminal device prepares to send a message to the second terminal device. The first terminal device hashes the message to obtain the digest, and then encrypts the digest content with its own private key. In the transmission process, the original text of the message is also transmitted to the second terminal device. When the second terminal device receives the message, it must use the public key of the first terminal device to decrypt the content, and then compare the digest result obtained by the first terminal device with the result obtained by the second terminal device after digest calculation of the original text. If the first terminal device and the second terminal device are completely consistent, it means that the data information has not been tampered with.
[0113] In the embodiment, the method further includes receiving a login page associated with the pre-authorization code, and determining the authority of the login page.
[0114] If the authority of the login page meets the preset condition, the login page is returned to the first terminal device.
[0115] In the embodiment, the login page associated with the pre-authorization code is the URL address of the login page jump in the first terminal device information. The authority range of the login page that can be accessed by the second terminal device is determined. If the preset condition is met, the login page is returned to the first terminal device, so that the first terminal device can obtain access content from the second terminal device.
[0116] For better illustration, please refer to Figure 3Fig. 1 shows a flowchart of a process in which a first terminal device interacts with a second terminal device, which includes the following steps:
[0117] S301. The first terminal device sends an authorization code to the second terminal device.
[0118] S302. The second terminal device generates access identification information based on the authorization code and sends the access identification information to the first terminal device.
[0119] S303. The second terminal device receives the access request and the access identification information sent by the first terminal device.
[0120] S304. The access identification information includes token information and a token time limit. The second terminal device verifies the token information based on the relationship between the token time limit and a first threshold value to obtain a second verification result. The first terminal device obtains a first verification result based on the second verification result.
[0121] S305. If the first verification result is passed, the second terminal device determines the access content based on the access request and the access identification information and returns the access content to the first terminal device.
[0122] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0123] The access content acquisition method provided by the present application builds an authorization node, introduces an Oauth2.0 authorization mechanism, and adds a pre-authorization action on an open platform access process. At the same time, in order to ensure the security requirements of the second terminal device and ensure the safety and reliability of each link in the interaction process, the present application adds an advanced asymmetric key identity verification link to the existing Oauth2.0 mechanism, which solves the problem that the message may be tampered with in the process of redirecting the first terminal device authorization page.
[0124] Figure 4 Fig. 1 shows a structure diagram of an access content acquisition device according to an embodiment of the present application. Specifically, the device 40 of the embodiment three includes:
[0125] The first receiving unit 401 is configured to receive an authorization code sent by a first terminal device. The authorization code is used to indicate that the first terminal device has the right to access a second terminal device.
[0126] The generating unit 402 is configured to generate access identification information based on the authorization code and send the access identification information to the first terminal device. The access identification information is used for the second terminal device to verify the first terminal device.
[0127] The first verification unit 403 is configured to receive the access request and the access identification information sent by the first terminal device, verify the access identification information, and obtain a first verification result.
[0128] The determination unit 404 is configured to determine the access content according to the access request and the access identification information if the first verification result is passed, and return the access content to the first terminal device.
[0129] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0130] Figure 5 FIG. 5 is a structural schematic diagram of an access content acquisition device according to an embodiment of the present application. Specifically, the device 50 of the embodiment five comprises:
[0131] The first receiving unit 501 is configured to receive an authorization code sent by the first terminal device; wherein the authorization code is used to represent that the first terminal device has the access right to the second terminal device.
[0132] The generation unit 502 is configured to generate access identification information according to the authorization code, and send the access identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device.
[0133] The first verification unit 503 is configured to receive the access request and the access identification information sent by the first terminal device, verify the access identification information, and obtain a first verification result.
[0134] The determination unit 504 is configured to determine the access content according to the access request and the access identification information if the first verification result is passed, and return the access content to the first terminal device.
[0135] In one example, the generation unit 502 comprises:
[0136] The acquisition module 5021 is configured to acquire the identifier of the user in the second terminal device, the name symbol of the first terminal device in the second terminal device, and the characteristic string according to the authorization code.
[0137] The generation module 5022 is configured to generate the user identification information according to the identifier, the name symbol, and the characteristic string according to a preset rule.
[0138] In one example, the generation module 5022 comprises:
[0139] The splicing sub-module 50221 is configured to splice the characteristic string and the name symbol in sequence to obtain a spliced string.
[0140] The adding submodule 50222 is configured to add one character in the identifier to the spliced string at every interval of a preset position to obtain an added string.
[0141] The arranging submodule 50223 is configured to arrange the added string in a reverse order to obtain an arranged string.
[0142] The encryption submodule 50224 is configured to encrypt the arranged string to generate the user identifier information.
[0143] In one example, the first verification unit 503 includes:
[0144] The verification module 5031 is configured to verify the token information according to a relationship between the token time limit and the first threshold value to obtain a second verification result.
[0145] The first determination module 5032 is configured to obtain the first verification result according to the second verification result.
[0146] In one example, the access identifier information includes refresh token information, and the first determination module 5032 includes:
[0147] The first determination submodule 50321 is configured to, if the second verification result is not passed, re-determine a third verification result according to a relationship between the refresh token information and a second threshold value.
[0148] The second determination submodule 50322 is configured to obtain the first verification result according to the third verification result.
[0149] In one example, the determination unit 504 includes:
[0150] The decryption processing module 5041 is configured to decrypt the access identifier information to obtain the identifier.
[0151] The second determination module 5042 is configured to determine the access content according to the identifier.
[0152] In one example, the apparatus further includes:
[0153] The first receiving unit 505 is configured to receive a request message of the authorization code sent by the first terminal device.
[0154] The first sending unit 506 is configured to send the authorization code to the first terminal device according to the request message.
[0155] In one example, the apparatus further includes:
[0156] The third receiving unit 507 is configured to receive a request message of the pre-authorization code sent by the first terminal device, wherein the pre-authorization code is used to verify the first terminal device.
[0157] The first verification unit 508 is configured to verify the pre-authorization code, and obtain a fourth verification result.
[0158] The judging unit 509 is configured to send the pre-authorization code to the first terminal device if the fourth verification result is passed.
[0159] In one example, the apparatus further includes:
[0160] The permission determining unit 510 is configured to receive a login page associated with the pre-authorization code, and determine a permission of the login page.
[0161] The returning unit 511 is configured to return the login page to the first terminal device if the permission of the login page meets a preset condition.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the apparatus described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0163] Figure 6 is a block diagram of a terminal device according to an example embodiment. The device can be a mobile phone, computer, digital broadcast terminal, messaging device, gaming console, tablet device, medical device, fitness device, personal digital assistant, etc.
[0164] The apparatus 600 can include one or more of the following components: a processing component 602, a memory 604, a power supply component 606, a multimedia component 608, an audio component 610, an input / output (I / O) interface 612, a sensor component 614, and a communication component 616.
[0165] The processing component 602 generally controls the overall operations of the apparatus 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 can include one or more processors 620 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 602 can include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0166] The memory 604 is configured to store various types of data to support the operation of the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 can be implemented by any type of volatile or nonvolatile storage devices or a combination thereof such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0167] The power supply component 606 supplies electrical power for the various components of the device 600. The power supply component 606 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing electrical power for the device 600.
[0168] The multimedia component 608 includes a screen providing an output interface between the device 600 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, swiping, and gestures on the touch panel. The touch sensors can not only sense a boundary of a touch or swiping action, but also detect duration and pressure associated with the touch or swiping action. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. The front and / or rear camera can receive external multimedia data when the device 600 is in an operation mode, such as a shooting mode or a video mode. Each of the front and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0169] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC) that is configured to receive external audio signals when the device 600 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0170] The I / O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which can be a keyboard, a click wheel, a button, and the like. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.
[0171] The sensor component 614 includes one or more sensors for providing status assessments for various aspects of the device 600. For example, the sensor component 614 can detect an open / closed position of the device 600, relative positioning of components, such as a display and keypad of the device 600, changes in position of the device 600 or a component of the device 600, presence or absence of user contact with the device 600, changes in orientation of the device 600 or acceleration / deceleration, and temperature changes of the device 600. The sensor component 614 can include proximity sensor(s) configured to detect presence of objects in a proximity without any physical contact. The sensor component 614 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 614 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0172] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and another device. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technology.
[0173] In an exemplary embodiment, the device 600 can be implemented using one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic modules to perform the above-described methods.
[0174] In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 604 including instructions stored therein, is also provided. The instructions may, for example, be executable by the processor 620 of the device 600 to perform the above-described methods. The non-transitory computer-readable storage medium may, for example, be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device, and the like.
[0175] A non-transitory computer-readable storage medium, when instructions stored therein are executed by a processor of a terminal device, causes the terminal device to perform the above-described method of the terminal device for accessing content.
[0176] The application also discloses a computer program product comprising a computer program which, when executed by a processor, implements the method as described in the embodiments.
[0177] Various implementations of the systems and techniques described above can be realized in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a programmable logic device (PLD), a computer hardware, firmware, software, and / or combinations thereof. These various implementations can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0178] Program code for carrying out methods of the present application can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine and partially on a remote machine or entirely on a remote machine or terminal device.
[0179] In the context of the present application, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0180] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
[0181] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0182] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as cloud computing server or cloud host, which is a host product in the cloud computing service system, and solves the defects of large management difficulty and weak business scalability in traditional physical host and VPS (Virtual Private Server, or VPS for short) services. The terminal device can also be a terminal device of a distributed system, or a terminal device combined with a blockchain. It should be understood that the various forms of processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this application can be achieved, and this document does not limit this.
[0183] Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.
[0184] It is to be understood that the application is not limited to the precise construction herein described and as shown in the attached drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is to be indicated by the appended claims, rather than the description and examples.
Claims
1. An access content acquisition method characterized by comprising: The method comprises: receiving an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device; obtaining an identifier of a user in the second terminal device, a name symbol of the first terminal device in the second terminal device and a characteristic string according to the authorization code; splicing the characteristic string and the name symbol in sequence to obtain a spliced string; adding one character in the identifier to the spliced string at every interval of a preset position to obtain an added string; arranging the added string in reverse order to obtain an arranged string; encrypting the arranged string to generate user identification information; sending access identification information containing the user identification information to the first terminal device; wherein the access identification information is used for the second terminal device to verify the first terminal device; receiving an access request and the access identification information sent by the first terminal device, verifying the access identification information to obtain a first verification result; if the first verification result is passed, decrypting the user identification information to obtain the identifier, determining access content according to the identifier and returning the access content to the first terminal device.
2. The method of claim 1, wherein, The access identification information comprises token information and a token time limit, and verifying the access identification information to obtain a first verification result comprises: verifying the token information according to the relationship between the token time limit and a first threshold to obtain a second verification result; obtaining the first verification result according to the second verification result.
3. The method of claim 2, wherein, The access identification information comprises refresh token information, and obtaining the first verification result according to the second verification result comprises: if the second verification result is not passed, re-determining a third verification result according to the relationship between the refresh token information and a second threshold; obtaining the first verification result according to the third verification result.
4. The method according to any one of claims 1 to 3, characterized in that, Before receiving the authorization code sent by the first terminal device, the method further comprises: receiving a request message of the authorization code sent by the first terminal device; sending the authorization code to the first terminal device according to the request message.
5. The method of claim 4, wherein, The method further comprises: receiving a request message of a pre-authorization code sent by the first terminal device; wherein the pre-authorization code is used to verify the first terminal device; verifying the pre-authorization code to obtain a fourth verification result; if the fourth verification result is passed, sending the pre-authorization code to the first terminal device.
6. The method of claim 5, wherein, The method further comprises: receiving a login page associated with the pre-authorization code and determining the authority of the login page; if the authority of the login page meets a preset condition, returning the login page to the first terminal device.
7. An access content acquisition apparatus characterized by comprising: The device comprises: a first receiving unit configured to receive an authorization code sent by a first terminal device; wherein the authorization code is used to represent that the first terminal device has the right to access a second terminal device; a generating unit configured to obtain an identifier of a user in the second terminal device, a name symbol of the first terminal device in the second terminal device and a characteristic string according to the authorization code; Concatenate the characteristic character string and the name character in order to obtain a concatenated character string; Adding a character of the identifier at every preset position in the concatenated character string to obtain an added character string; Arrange the added character strings in reverse order to obtain an arranged character string; Encrypting the arranged character string to generate user identification information; Sending access identification information including the user identification information to the first terminal device; wherein the access identification information is used by the second terminal device to verify the first terminal device; a first verification unit, configured to receive the access request and the access identification information sent by the first terminal device, verify the access identification information, and obtain a first verification result; The determining unit is configured to decrypt the user identification information to obtain the identifier if the first verification result is passed, determine the access content according to the identifier, and return the access content to the first terminal device.
8. A terminal device, comprising: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.
10. A computer program product, characterised in that, The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when the computer program is executed by a processor.
Citation Information
Patent Citations
Secure mobile framework
CN104718526A
Method and system for accessing application data
CN109218298A