WO2015096569A1 - Resource gateway and resource access authorization method - Google Patents
Resource gateway and resource access authorization method Download PDFInfo
- Publication number
- WO2015096569A1 WO2015096569A1 PCT/CN2014/091649 CN2014091649W WO2015096569A1 WO 2015096569 A1 WO2015096569 A1 WO 2015096569A1 CN 2014091649 W CN2014091649 W CN 2014091649W WO 2015096569 A1 WO2015096569 A1 WO 2015096569A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- resource
- code
- request
- gateway
- owner
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6209—Protecting access to data via a platform, e.g. using keys or access control rules to a single file or object, e.g. in a secure envelope, encrypted and accessed using a key, or with access control rules appended to the object itself
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/468—Specific access rights for resources, e.g. using capability register
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/64—Hybrid switching systems
- H04L12/6418—Hybrid transport
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
Definitions
- the present invention relates to the field of network technologies, and in particular, to a resource gateway and a resource access authorization method.
- a social application eg, Weibo
- a resource owner opens its own specific API (Application Programming Interface) to enable other applications that are resource consumers to call that particular API.
- API Application Programming Interface
- resource owners are based on the OAUTH protocol. After confirming that the resource user is a legitimate user, the resource user is provided with the resource access code to enable the resource user to use the resource owner based on the access code. Resources provided.
- the resource user When the resource user obtains the access code of the resource from the resource owner based on the OAUTH protocol, the resource user needs to make two API calls to the resource owner (the first call to the API for obtaining the authorization code of the resource, the second call) The API for obtaining access codes for resources, which brings inconvenience to resource users.
- the embodiment of the present application solves the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art by providing a resource gateway and a resource access authorization method.
- a resource gateway including:
- a memory for storing program code
- a processor configured to interface with the memory, the first network interface, and the second network, to read the program code in the memory, and execute:
- the processor is further configured to:
- the processor is further configured to:
- the processor Also used for:
- the first format of the access code of the resource is converted from the first format to a first predetermined format, wherein the first format is any format different from the first predetermined format.
- the processor is further configured to:
- the second network interface After obtaining the authorization code of the first resource from the resource owner of the first resource according to the first request, according to the authorization code of the first resource provided by the resource owner, and passing The second network interface acquires a refresh code of the first resource from a resource owner of the first resource, and returns a refresh code of the first resource to the resource user by using the first network interface.
- the processor is further configured to:
- the first The format of the refresh code of the resource is converted from the second format to a second predetermined format, wherein the second format is any format different from the second predetermined format.
- the processor is further configured to:
- Receiving, by the first network interface, the refresh code of the first resource to the resource user receiving, by the resource user, a fourth request for refreshing an access code of the first resource a request, the fourth request is generated by the resource user according to the refresh code of the first resource, and a fourth API provided by the resource gateway, where the fourth request includes the first resource Refreshing code; after determining that the resource owner supports refreshing the access code of the first resource, acquiring, according to the fourth request, the first resource that is refreshed from the resource owner by using the second network interface And accessing the updated access code of the first resource to the resource user by using the first network interface.
- the processor is further configured to:
- the processor is further configured to:
- the format of the refresh code of the first resource is converted into the second format by the second predetermined format.
- the second aspect provides a resource access authorization method, including:
- the resource gateway acquires an access code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;
- the resource gateway returns an access code of the first resource to the resource user.
- the resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request, include:
- the resource gateway generates a second request for requesting to acquire an authorization code of the first resource according to the first request and a second API provided by a resource owner of the first resource;
- the resource gateway receives an authorization code of the first resource returned by the resource owner.
- the resource gateway is configured according to the first resource provided by the resource owner
- the authorization code, the access code of the first resource is obtained from the resource owner of the first resource, and includes:
- the resource gateway generates a third request for requesting to acquire an access code of the first resource, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, where The third request includes an authorization code of the first resource;
- the resource gateway receives an access code of the first resource returned by the resource owner.
- the method further includes:
- the resource gateway converts the format of the access code of the first resource from the first format to a first predetermined format, where the One format is any format that is different from the first predetermined format.
- the method further includes:
- the resource gateway acquires a refresh code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;
- the resource gateway returns a refresh code of the first resource to the resource user.
- the method before the resource gateway returns the refresh code of the first resource to the resource user, the method also includes:
- the resource gateway converts the format of the refresh code of the first resource from the second format to a second predetermined format, where the The second format is any format different from the second predetermined format.
- the method further includes:
- the resource gateway After the resource gateway determines that the resource owner supports the refresh of the access code of the first resource, the resource gateway acquires the access code of the first resource after the refresh from the resource owner according to the fourth request;
- the resource gateway returns an access code of the refreshed first resource to the resource user.
- the resource gateway obtains a refresh from the resource owner of the first resource according to the fourth request After the access code of the first resource, including:
- the resource gateway generates a fifth request for requesting to refresh an access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, where The fifth request includes a refresh code of the first resource;
- the resource gateway receives the refreshed access code of the first resource returned by the resource owner.
- the resource gateway is configured according to the refresh code of the first resource, and the resource of the first resource
- the fifth API provided by the owner, before generating the fifth request for requesting to refresh the access code of the first resource the method further includes:
- the resource gateway converts a format of a refresh code of the first resource from the second predetermined format to the second format.
- a resource gateway including: a first network interface and a second network interface; a memory for storing program code; a processor, a memory, a first network interface, and a second network interface
- the connection is used to read the program code in the memory, and execute: receiving, by the first network interface, a first request sent by the resource user for requesting to acquire an access code of the first resource, where the first request is a resource user according to the resource And generating, by the first API provided by the gateway, the authorization code of the first resource from the resource owner of the first resource by using the second network interface; and the authorization code of the first resource provided by the resource owner, and Acquiring an access code of the first resource from the resource owner of the first resource by using the second network interface; and returning the access code of the first resource to the resource user by using the first network interface.
- the resource gateway opens its first API to the resource user, when the resource user needs to obtain the access code of the first resource, the resource user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only the An API call) implements the access code for the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user only needs to target the resource network. By performing an API call, the access code of the resource can be obtained through the resource gateway, thereby reducing the number of times the resource user makes API calls, and bringing a convenient technical effect to the resource user.
- FIG. 1 is a schematic structural diagram of a resource gateway in an embodiment of the present application.
- 2 to 7 are flowcharts of a resource access authorization method in an embodiment of the present application.
- the embodiment of the present application solves the technical problem that the resource user needs to make two API calls to the resource owner when acquiring the access code of the resource in the prior art by providing a resource gateway and a resource access authorization method.
- a resource gateway includes: a first network interface and a second network interface; a memory for storing program code; a processor, connected to the memory, the first network interface, and the second network interface, for reading in the memory
- the program code is configured to: receive, by using the first network interface, a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway.
- the authorization code of the first resource from the resource owner of the first resource through the second network interface; according to the authorization code of the first resource provided by the resource owner, and from the first through the second network interface
- the resource owner of the resource obtains the access code of the first resource; and returns the access code of the first resource to the resource user through the first network interface.
- the resource gateway opens its first API to the resource user, when the resource user needs to obtain the access code of the first resource, the resource user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only the An API call) implements the access code for the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user only needs to make an API call to the resource gateway, and then the resource gateway can be used. Obtain the access code of the resource, thereby reducing the number of times the resource user makes API calls, and bringing convenient technical effects to the resource user.
- first resource or “resource” as used herein refers to a specific API capable of implementing a specific service, and when the specific API is called, an application providing the specific API can implement the specific service. .
- resource owner refers to an application that can provide the specific API, such as a social application, a shopping application, etc., and what kind of application is specific to the resource owner, The embodiments of the present application are not specifically limited.
- resource consumer refers to other applications that call that particular API.
- this embodiment provides a resource gateway, including:
- a memory 130 configured to store program code
- One or more processors 140 are coupled to the memory 130, the first network interface 110, and the second network interface 120 for reading program code in the memory 130, and executing:
- the first resource is a specific API provided by the resource owner for the resource user and capable of implementing a specific service.
- the resource consumer can call this particular API to implement that particular service through the resource owner.
- the resource owner is a Weibo-like application
- the first resource may be an API for publishing information through a Weibo-like application.
- the resource gateway since the resource gateway opens its first API to the resource user, the resource enables When the user needs to obtain the access code of the first resource, the user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only one API call is made), thereby realizing the access code for acquiring the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user can pass the resource by only making an API call to the resource gateway.
- the gateway obtains the access code of the resource, thereby reducing the number of times the resource user makes the API call, and brings a convenient technical effect to the resource user.
- the resource gateway may be connected to multiple resource users through the first network interface, and connected to multiple resource owners through the second network interface.
- the first request sent by the resource owner should include the label of the resource owner of the first resource.
- the processor 140 is further configured to: determine, by using the label, the resource owner of the first resource, thereby The resource owner obtains the access code of the first resource.
- one resource user needs to connect multiple resource owners to obtain different resources provided by different resource owners, but this brings a large number of interfaces to resource users. maintenance work.
- the resource user only needs to connect with the resource gateway, thereby reducing the interface maintenance work of the resource user, reducing the access difficulty, and reducing the technical effect of the docking risk.
- a resource owner needs to connect multiple resource users to provide resources to different resource users, but this brings a lot of interface maintenance work to resource owners.
- the resource owner only needs to connect with the resource gateway, thereby reducing the technical maintenance effect of reducing the resource owner's interface maintenance work and reducing the docking risk.
- the memory 130 is further configured with different protocols that the resource owners respectively follow.
- the processor 140 is further configured to: after receiving the first request sent by the resource user, based on the resources in the first request.
- the owner's tag retrieves the protocol followed by the resource owner from the memory 130 and, based on the protocol, obtains the access code of the resource from the resource owner.
- the resource user only needs to send the first request to the resource gateway based on the first API provided by the resource gateway when acquiring the access code of the resource, and does not need the resource user to understand different resource owners.
- the protocols followed provide convenience to resource users.
- the processor 140 is further configured to:
- the resource owner after receiving the second request, the resource owner obtains an authentication information (for example, a user name and a corresponding user password) from the resource user, and verifies whether the authentication information is stored with the resource owner. The authentication information is consistent. If they are consistent, the resource user is determined to be a legitimate user, and the authorization code of the first resource is returned to the resource gateway.
- an authentication information for example, a user name and a corresponding user password
- the processor 140 is further configured to:
- the resource user directly communicates with the resource owner, and the resource user first sends a request for acquiring the authorization code of the first resource to the resource owner based on the second API provided by the resource user (ie, : performing the first API call), after the resource user obtains the authorization code of the first resource, the resource user sends the resource identifier to the resource owner based on the authorization code of the first resource and the third API provided by the resource owner.
- a request for acquiring an access code of the first resource ie, making a second API call), thereby obtaining an access code of the first resource.
- the resource gateway generates a second request for requesting to acquire the authorization code of the first resource based on the second API provided by the resource owner (ie, calling the second API by the resource gateway to obtain).
- the resource gateway sends the resource identifier to the resource owner based on the authorization code of the first resource and the third API provided by the resource owner.
- the request for the access code of the first resource ie, the third API is invoked by the resource gateway to obtain the access code of the first resource
- the obtained access code of the first resource is returned to the resource user, thereby reducing resources.
- the number of times the user makes API calls brings convenience to resource users.
- the processor 140 is further configured to:
- the format of the access code of the first resource is the first format
- the access codes of the resources provided by the resource owners may have multiple different formats, which brings inconvenience to the resource users in resolving the access codes of the resources.
- the resource gateway converts the format of the access code of the first resource returned by the resource owner into the first predetermined format, thereby unifying the format of the access code of the resource, and realizing that the resource user can be different.
- the resource owner obtains the access code of the resource with the same format, thereby facilitating the technical effect of the resource user analyzing the access code of the resource.
- the processor 140 is further configured to:
- the method After obtaining the authorization code of the first resource from the resource owner of the first resource according to the first request, according to the authorization code of the first resource provided by the resource owner, and from the resource of the first resource through the second network interface 120 The method obtains a refresh code of the first resource, and returns a refresh code of the first resource to the resource user through the first network interface 110.
- the access of the first resource may have an expiration date (for example: 24 hours, or 48 hours, etc.), so that the resource user must access the resource owner based on the access code of the first resource during the validity period. And use the first resource. If the access code of the first resource exceeds the validity period, the access code of the first resource needs to be refreshed according to the refresh code of the first resource to obtain an access code of the first resource after the refresh.
- an expiration date for example: 24 hours, or 48 hours, etc.
- the resource gateway when the resource gateway receives the access code of the first resource returned by the resource owner, the resource gateway also receives the refresh code of the first resource provided by the resource owner, and the resource gateway will use the first resource.
- the refresh code is sent to the resource user along with the access code of the first resource, thereby implementing the technical effect that the resource user can refresh the access code of the first resource according to the refresh code of the first resource.
- the processor 140 is further configured to:
- the format of the refresh code of the first resource is the second format
- converting the format of the refresh code of the first resource by the second format Is a second predetermined format, wherein the second format is any format different from the second predetermined format.
- the refresh code of the resources provided by each resource owner may have multiple types. The same format, which brings inconvenience to the resource user in resolving the refresh code of the resource.
- the resource gateway converts the format of the refresh code of the first resource returned by the resource owner into a second predetermined format, thereby unifying the format of the refresh code of the first resource, thereby realizing that the resource user can
- the refresh code of the first resource with the same format is obtained from different resource owners, thereby facilitating the technical effect of the resource user analyzing the refresh code of the first resource.
- the processor 140 is further configured to:
- the fourth request After returning the refresh code of the first resource to the resource user through the first network interface 110, receiving a fourth request sent by the resource user for requesting to refresh the access code of the first resource, where the fourth request is a resource user And generating, according to the refresh code of the first resource, and the fourth API provided by the resource gateway, where the fourth request includes a refresh code of the first resource; after determining that the resource owner supports updating the access code of the first resource, And requesting, by using the second network interface 120, the access code of the refreshed first resource from the resource owner; and returning, by the first network interface 110, the updated access code of the first resource to the resource user.
- the resource gateway further opens its fourth API to the resource user, and the fourth API is used to control the resource gateway to refresh the access code of the first resource, thereby realizing that the resource user can rely on the first resource.
- the technical effect of refreshing the access code of the first resource by the refresh code is used to control the resource gateway to refresh the access code of the first resource, thereby realizing that the resource user can rely on the first resource.
- the processor 140 is further configured to:
- the processor 140 is further configured to:
- the format of the refresh code of the first resource is determined by The second predetermined format is converted to the second format.
- the format of the refresh code of the first resource that the resource owner can identify is the second format
- the format of the refresh code of the first resource of the resource gateway is converted from the second predetermined format to the second format. And generating, according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, a fifth request for requesting to refresh the access code of the first resource.
- the present application provides a resource access authorization method, as shown in FIG. 2, including:
- Step 101 The resource gateway receives a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway.
- Step 102 The resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request.
- Step 103a The resource gateway acquires an access code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner.
- Step 104b The resource gateway returns the access code of the first resource to the resource user.
- step 102 includes:
- Step 201 The resource gateway generates a second request for requesting to acquire an authorization code of the first resource according to the first request and the second API provided by the resource owner of the first resource.
- Step 202 The resource gateway sends the second request to the resource owner.
- Step 203 The resource gateway receives an authorization code of the first resource returned by the resource owner.
- step 103a includes:
- Step 301 The resource gateway generates a third request for requesting to acquire an access code of the first resource according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, where the third request includes The authorization code of the first resource;
- Step 302 The resource gateway sends the third request to the resource owner.
- Step 303 The resource gateway receives an access code of the first resource returned by the resource owner.
- the method before step 104a, the method further includes:
- the resource gateway converts the format of the access code of the first resource from the first format to the first predetermined format, where the first format is different from the first predetermined format. Any format.
- the method further includes:
- Step 103b The resource gateway acquires a refresh code of the first resource from the resource owner of the first resource according to the authorization code of the first resource provided by the resource owner.
- Step 104b The resource gateway returns the refresh code of the first resource to the resource user.
- the method before step 104b, the method further includes:
- the resource gateway converts the format of the refresh code of the first resource from the second format to the second predetermined format, where the second format is different from the second predetermined format. Any format.
- the method further includes:
- Step 105 The resource gateway receives a fourth request sent by the resource user for requesting to refresh the access code of the first resource, where the fourth request is a refresh code of the resource resource according to the first resource, and a fourth API provided by the resource gateway. The generated, wherein the fourth request includes a refresh code of the first resource;
- Step 106 After the resource gateway determines that the resource owner supports the refreshing of the access code of the first resource, the resource gateway acquires the access code of the refreshed first resource from the resource owner according to the fourth request.
- Step 107 The resource gateway returns the refreshed access code of the first resource to the resource user.
- step 106 includes:
- Step 401 The resource gateway generates a fifth request for requesting to refresh the access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, where the fifth request includes The refresh code of the first resource;
- Step 402 The resource gateway sends the fifth request to the resource owner.
- Step 403 The resource gateway receives the access code of the refreshed first resource returned by the resource owner.
- the method before step 401, the method further includes:
- the resource gateway converts the format of the refresh code of the first resource from the second predetermined format to the second format.
- embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
- the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
- These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
- the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Signal Processing (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
A resource gateway, comprising a first network interface and a second network interface; a memory which is used for storing a program code; and a processor which is connected to the memory, the first network interface and the second network interface and is used for reading the program code in the memory. The processor: receives a first request which is sent by a resource user for requesting to acquire an access code of a first resource via the first network interface, the first request being generated by the resource user according to a first API provided by the resource gateway; according to the first request, acquires from a resource owner of the first resource an authorization code of the first resource via the second network interface; according to the authorization code of the first resource which is provided by the resource owner, acquires from the resource owner of the first resource the access code of the first resource via the second network interface; and returns the access code of the first resource to the resource user via the first network interface. Also disclosed at the same time is a resource access authorization method.
Description
本发明涉及网络技术领域,尤其涉及一种资源网关、及资源访问授权方法。The present invention relates to the field of network technologies, and in particular, to a resource gateway and a resource access authorization method.
现今,很多资源拥有者都将自身的资源对外开放,以提供给资源使用者使用。例如,作为资源拥有者的社交类应用程序(例如:微博)将自身的特定API(Application Programming Interface,应用程序编程接口)对外开放,以使作为资源使用者的其他应用程序能够调用该特定API,从而通过社交类应用程序来发布信息。Today, many resource owners open their own resources to provide access to resource users. For example, a social application (eg, Weibo) as a resource owner opens its own specific API (Application Programming Interface) to enable other applications that are resource consumers to call that particular API. To publish information through social applications.
出于信息安全的考虑,很多资源拥有者都基于OAUTH协议,在确认资源使用者为合法用户后,向资源使用者提供资源的访问码,以使资源使用者能够基于该访问码使用资源拥有者提供的资源。For information security reasons, many resource owners are based on the OAUTH protocol. After confirming that the resource user is a legitimate user, the resource user is provided with the resource access code to enable the resource user to use the resource owner based on the access code. Resources provided.
在资源使用者基于OAUTH协议从资源拥有者获取资源的访问码时,资源使用者需要对资源拥有者进行两次API调用(第一次调用用于获取资源的授权码的API,第二次调用用于获取资源的访问码的API),这给资源使用者带来了不便。When the resource user obtains the access code of the resource from the resource owner based on the OAUTH protocol, the resource user needs to make two API calls to the resource owner (the first call to the API for obtaining the authorization code of the resource, the second call) The API for obtaining access codes for resources, which brings inconvenience to resource users.
发明内容Summary of the invention
本申请实施例通过提供一种资源网关、及资源访问授权方法,解决了现有技术中资源使用者在获取资源的访问码时,需要进行两次API调用的技术问题。The embodiment of the present application solves the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art by providing a resource gateway and a resource access authorization method.
第一方面,提供了一种资源网关,包括:In a first aspect, a resource gateway is provided, including:
第一网络接口、以及第二网络接口;a first network interface and a second network interface;
存储器,用于存储程序代码;a memory for storing program code;
处理器,与所述存储器、所述第一网络接口、以及所述第二网络接口连接,用于读取所述存储器中的所述程序代码,执行:
a processor, configured to interface with the memory, the first network interface, and the second network, to read the program code in the memory, and execute:
通过所述第一网络接口接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,所述第一请求是所述资源使用者根据所述资源网关提供的第一API生成的;根据所述第一请求,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的授权码;根据所述资源拥有者提供的所述第一资源的授权码,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的访问码;通过所述第一网络接口将所述第一资源的访问码返回给所述资源使用者。Receiving, by the first network interface, a first request for requesting to acquire an access code of the first resource, where the first request is a first API provided by the resource user according to the resource gateway Generating; according to the first request, obtaining an authorization code of the first resource from a resource owner of the first resource by using the second network interface; according to the first provided by the resource owner An authorization code of the resource, and obtaining, by the second network interface, an access code of the first resource from a resource owner of the first resource; returning an access code of the first resource by using the first network interface To the resource user.
结合第一方面,在第一方面的第一种可能的实施方式中,所述处理器,还用于:In conjunction with the first aspect, in a first possible implementation manner of the first aspect, the processor is further configured to:
根据所述第一请求、以及所述第一资源的资源拥有者提供的第二API,生成用于请求获取所述第一资源的授权码的第二请求;通过所述第二网络接口将所述第二请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的所述第一资源的授权码。Generating, according to the first request, and the second API provided by the resource owner of the first resource, a second request for requesting to acquire an authorization code of the first resource; Transmitting the second request to the resource owner; receiving, by the second network interface, an authorization code of the first resource returned by the resource owner.
结合第一方面、或第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,所述处理器,还用于:With reference to the first aspect, or the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the processor is further configured to:
根据所述第一资源的授权码、以及所述第一资源的资源拥有者提供的第三API,生成用于请求获取所述第一资源的访问码的第三请求,其中,所述第三请求中包含所述第一资源的授权码;通过所述第二网络接口将所述第三请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的所述第一资源的访问码。Generating, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, a third request for requesting to acquire an access code of the first resource, where the third The request includes an authorization code of the first resource; the third request is sent to the resource owner by the second network interface; and the returned by the resource owner is received by the second network interface The access code of the first resource.
结合第一方面、或第一方面的第一种可能的实施方式、或第一方面的第二种可能的实施方式,在第一方面的第三种可能的实施方式中,所述处理器,还用于:With reference to the first aspect, or the first possible implementation manner of the first aspect, or the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the processor, Also used for:
在所述通过所述第一网络接口将所述第一资源的访问码返回给所述资源使用者之前,在所述第一资源的访问码的格式为第一格式时,将所述第一资源的访问码的格式由所述第一格式转换为第一预定格式,其中,所述第一格式为与所述第一预定格式不同的任一格式。Before the access code of the first resource is returned to the resource user by using the first network interface, when the format of the access code of the first resource is the first format, the first The format of the access code of the resource is converted from the first format to a first predetermined format, wherein the first format is any format different from the first predetermined format.
结合第一方面、或第一方面的第一种可能的实施方式、或第一方面的第二种可能的实施方式、或第一方面的第三种可能的实施方式,在第一方面的第四种可能的实施方式中,所述处理器,还用于:
In combination with the first aspect, or the first possible implementation of the first aspect, or the second possible implementation of the first aspect, or the third possible implementation of the first aspect, in the first aspect In four possible implementation manners, the processor is further configured to:
在所述根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码之后,根据所述资源拥有者提供的所述第一资源的授权码,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的刷新码;通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者。After obtaining the authorization code of the first resource from the resource owner of the first resource according to the first request, according to the authorization code of the first resource provided by the resource owner, and passing The second network interface acquires a refresh code of the first resource from a resource owner of the first resource, and returns a refresh code of the first resource to the resource user by using the first network interface.
结合一方面的第四种可能的实施方式,在第一方面的第五种可能的实施方式中,所述处理器,还用于:In a fifth possible implementation manner of the first aspect, the processor is further configured to:
在所述通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者之前,在所述第一资源的刷新码的格式为第二格式时,将所述第一资源的刷新码的格式由所述第二格式转换为第二预定格式,其中,所述第二格式为与所述第二预定格式不同的任一格式。Before the refresh code of the first resource is returned to the resource user by using the first network interface, when the format of the refresh code of the first resource is the second format, the first The format of the refresh code of the resource is converted from the second format to a second predetermined format, wherein the second format is any format different from the second predetermined format.
结合第一方面的第四种可能的实施方式、或第一方面的第五种可能的实施方式,在第一方面的第六种可能的实施方式中,所述处理器,还用于:With reference to the fourth possible implementation manner of the first aspect, or the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the processor is further configured to:
在所述通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者之后,接收所述资源使用者发来的用于请求刷新第一资源的访问码的第四请求,所述第四请求是所述资源使用者根据所述第一资源的刷新码、以及所述资源网关提供的第四API生成的,其中,所述第四请求中包含所述第一资源的刷新码;在确定所述资源拥有者支持刷新第一资源的访问码后,根据所述第四请求,并通过所述第二网络接口从所述资源拥有者获取刷新后的第一资源的访问码;通过所述第一网络接口将所述刷新后的第一资源的访问码返回给所述资源使用者。Receiving, by the first network interface, the refresh code of the first resource to the resource user, receiving, by the resource user, a fourth request for refreshing an access code of the first resource a request, the fourth request is generated by the resource user according to the refresh code of the first resource, and a fourth API provided by the resource gateway, where the fourth request includes the first resource Refreshing code; after determining that the resource owner supports refreshing the access code of the first resource, acquiring, according to the fourth request, the first resource that is refreshed from the resource owner by using the second network interface And accessing the updated access code of the first resource to the resource user by using the first network interface.
结合第一方面的第六种可能的实施方式,在第一方面的第七种可能的实施方式中,所述处理器,还用于:In conjunction with the sixth possible implementation of the first aspect, in a seventh possible implementation of the first aspect, the processor is further configured to:
根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求,其中,所述第五请求中包含所述第一资源的刷新码;通过所述第二网络接口将所述第五请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的刷新后的所述第一资源的访问码。Generating a fifth request for requesting to refresh an access code of the first resource according to a refresh code of the first resource and a fifth API provided by a resource owner of the first resource, where the fifth The request includes a refresh code of the first resource; the fifth request is sent to the resource owner by using the second network interface; and the refreshed by the resource owner is received by the second network interface The access code of the first resource.
结合第一方面的第七种可能的实施方式,在第一方面的第八种可能的实施方式中,所述处理器,还用于:
In conjunction with the seventh possible implementation of the first aspect, in the eighth possible implementation manner of the first aspect, the processor is further configured to:
在所述根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求之前,将所述第一资源的刷新码的格式由所述第二预定格式转换为所述第二格式。Before generating the fifth request for requesting to refresh the access code of the first resource, according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, The format of the refresh code of the first resource is converted into the second format by the second predetermined format.
基于同一发明构思,第二方面,提供了一种资源访问授权方法,包括:Based on the same inventive concept, the second aspect provides a resource access authorization method, including:
资源网关接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,所述第一请求是所述资源使用者根据所述资源网关提供的第一API生成的;Receiving, by the resource gateway, a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway;
所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码;And obtaining, by the resource gateway, an authorization code of the first resource from a resource owner of the first resource according to the first request;
所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的访问码;The resource gateway acquires an access code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;
所述资源网关将所述第一资源的访问码返回给所述资源使用者。The resource gateway returns an access code of the first resource to the resource user.
结合第二方面,在第二方面的第一种可能的实施方式中,所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码,包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request, include:
所述资源网关根据所述第一请求、以及所述第一资源的资源拥有者提供的第二API,生成用于请求获取所述第一资源的授权码的第二请求;The resource gateway generates a second request for requesting to acquire an authorization code of the first resource according to the first request and a second API provided by a resource owner of the first resource;
所述资源网关将所述第二请求发送给所述资源拥有者;Transmitting, by the resource gateway, the second request to the resource owner;
所述资源网关接收所述资源拥有者返回的所述第一资源的授权码。The resource gateway receives an authorization code of the first resource returned by the resource owner.
结合第二方面、或第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的访问码,包括:With reference to the second aspect, or the first possible implementation manner of the second aspect, in the second possible implementation manner of the second aspect, the resource gateway is configured according to the first resource provided by the resource owner The authorization code, the access code of the first resource is obtained from the resource owner of the first resource, and includes:
所述资源网关根据所述第一资源的授权码、以及所述第一资源的资源拥有者提供的第三API,生成用于请求获取所述第一资源的访问码的第三请求,其中,所述第三请求中包含所述第一资源的授权码;The resource gateway generates a third request for requesting to acquire an access code of the first resource, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, where The third request includes an authorization code of the first resource;
所述资源网关将所述第三请求发送给所述资源拥有者;Transmitting, by the resource gateway, the third request to the resource owner;
所述资源网关接收所述资源拥有者返回的所述第一资源的访问码。The resource gateway receives an access code of the first resource returned by the resource owner.
结合第二方面、或第二方面的第一种可能的实施方式、或第二方面的第二种可能的实施方式,在第二方面的第三种可能的实施方式中,在所述资源
网关将所述第一资源的访问码返回给所述资源使用者之前,所述方法还包括:With reference to the second aspect, or the first possible implementation of the second aspect, or the second possible implementation of the second aspect, in a third possible implementation of the second aspect, in the resource
Before the gateway returns the access code of the first resource to the resource user, the method further includes:
在所述第一资源的访问码的格式为第一格式时,所述资源网关将所述第一资源的访问码的格式由所述第一格式转换为第一预定格式,其中,所述第一格式为与所述第一预定格式不同的任一格式。When the format of the access code of the first resource is the first format, the resource gateway converts the format of the access code of the first resource from the first format to a first predetermined format, where the One format is any format that is different from the first predetermined format.
结合第二方面、或第二方面的第一种可能的实施方式、或第二方面的第二种可能的实施方式、或第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施方式中,在所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码之后,所述方法还包括:With reference to the second aspect, or the first possible implementation of the second aspect, or the second possible implementation of the second aspect, or the third possible implementation of the second aspect, in the second aspect In the four possible implementation manners, after the resource gateway obtains the authorization code of the first resource from the resource owner of the first resource according to the first request, the method further includes:
所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的刷新码;The resource gateway acquires a refresh code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;
所述资源网关将所述第一资源的刷新码返回给所述资源使用者。The resource gateway returns a refresh code of the first resource to the resource user.
结合二方面的第四种可能的实施方式,在第二方面的第五种可能的实施方式中,在所述资源网关将所述第一资源的刷新码返回给所述资源使用者之前,所述方法还包括:With reference to the fourth possible implementation of the second aspect, in a fifth possible implementation manner of the second aspect, before the resource gateway returns the refresh code of the first resource to the resource user, The method also includes:
在所述第一资源的刷新码的格式为第二格式时,所述资源网关将所述第一资源的刷新码的格式由所述第二格式转换为第二预定格式,其中,所述第二格式为与所述第二预定格式不同的任一格式。When the format of the refresh code of the first resource is the second format, the resource gateway converts the format of the refresh code of the first resource from the second format to a second predetermined format, where the The second format is any format different from the second predetermined format.
结合第二方面的第四种可能的实施方式、或第二方面的第五种可能的实施方式,在第二方面的第六种可能的实施方式中,在所述资源网关将所述第一资源的刷新码返回给所述资源使用者之后,所述方法还包括:With reference to the fourth possible implementation manner of the second aspect, or the fifth possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the first After the refresh code of the resource is returned to the resource user, the method further includes:
所述资源网关接收所述资源使用者发来的用于请求刷新第一资源的访问码的第四请求,所述第四请求是所述资源使用者根据所述第一资源的刷新码、以及所述资源网关提供的第四API生成的,其中,所述第四请求中包含所述第一资源的刷新码;Receiving, by the resource user, a fourth request for requesting to refresh an access code of the first resource, where the fourth request is a refresh code of the resource resource according to the first resource, and The fourth API provided by the resource gateway, where the fourth request includes a refresh code of the first resource;
在所述资源网关确定所述资源拥有者支持刷新第一资源的访问码后,所述资源网关根据所述第四请求,从所述资源拥有者获取刷新后的第一资源的访问码;After the resource gateway determines that the resource owner supports the refresh of the access code of the first resource, the resource gateway acquires the access code of the first resource after the refresh from the resource owner according to the fourth request;
所述资源网关将所述刷新后的第一资源的访问码返回给所述资源使用者。
The resource gateway returns an access code of the refreshed first resource to the resource user.
结合第二方面的第六种可能的实施方式,在第二方面的第七种可能的实施方式中,所述资源网关根据所述第四请求,从所述第一资源的资源拥有者获取刷新后的第一资源的访问码,包括:With reference to the sixth possible implementation of the second aspect, in a seventh possible implementation manner of the second aspect, the resource gateway obtains a refresh from the resource owner of the first resource according to the fourth request After the access code of the first resource, including:
所述资源网关根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求,其中,所述第五请求中包含所述第一资源的刷新码;The resource gateway generates a fifth request for requesting to refresh an access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, where The fifth request includes a refresh code of the first resource;
所述资源网关将所述第五请求发送给所述资源拥有者;Sending, by the resource gateway, the fifth request to the resource owner;
所述资源网关接收所述资源拥有者返回的刷新后的所述第一资源的访问码。The resource gateway receives the refreshed access code of the first resource returned by the resource owner.
结合第二方面的第七种可能的实施方式,在第二方面的第八种可能的实施方式中,在所述资源网关根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求之前,所述方法还包括:With reference to the seventh possible implementation of the second aspect, in an eighth possible implementation manner of the second aspect, the resource gateway is configured according to the refresh code of the first resource, and the resource of the first resource The fifth API provided by the owner, before generating the fifth request for requesting to refresh the access code of the first resource, the method further includes:
所述资源网关将所述第一资源的刷新码的格式由所述第二预定格式转换为所述第二格式。The resource gateway converts a format of a refresh code of the first resource from the second predetermined format to the second format.
本申请实施例中技术方案的有益效果如下:The beneficial effects of the technical solution in the embodiments of the present application are as follows:
本申请实施例中,公开了一种资源网关,包括:第一网络接口、以及第二网络接口;存储器,用于存储程序代码;处理器,与存储器、第一网络接口、以及第二网络接口连接,用于读取存储器中的程序代码,执行:通过第一网络接口接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,第一请求是资源使用者根据资源网关提供的第一API生成的;根据第一请求,并通过第二网络接口从第一资源的资源拥有者获取第一资源的授权码;根据资源拥有者提供的第一资源的授权码,并通过第二网络接口从第一资源的资源拥有者获取第一资源的访问码;通过第一网络接口将第一资源的访问码返回给资源使用者。由于,资源网关将其第一API开放给资源使用者,资源使用者在需要获取第一资源的访问码时,只需基于第一API生成第一请求并发送给资源网关(即:只进行了一次API调用),便实现了获取第一资源的访问码。所以,有效解决了现有技术中资源使用者在获取资源的访问码时,需要进行两次API调用的技术问题,实现了资源使用者只需针对资源网
关进行一次API调用,就可以通过资源网关获取资源的访问码,从而减少了资源使用者进行API调用的次数,给资源使用者带来了便利的技术效果。In the embodiment of the present application, a resource gateway is disclosed, including: a first network interface and a second network interface; a memory for storing program code; a processor, a memory, a first network interface, and a second network interface The connection is used to read the program code in the memory, and execute: receiving, by the first network interface, a first request sent by the resource user for requesting to acquire an access code of the first resource, where the first request is a resource user according to the resource And generating, by the first API provided by the gateway, the authorization code of the first resource from the resource owner of the first resource by using the second network interface; and the authorization code of the first resource provided by the resource owner, and Acquiring an access code of the first resource from the resource owner of the first resource by using the second network interface; and returning the access code of the first resource to the resource user by using the first network interface. Because the resource gateway opens its first API to the resource user, when the resource user needs to obtain the access code of the first resource, the resource user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only the An API call) implements the access code for the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user only needs to target the resource network.
By performing an API call, the access code of the resource can be obtained through the resource gateway, thereby reducing the number of times the resource user makes API calls, and bringing a convenient technical effect to the resource user.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本申请实施例中资源网关的结构示意图;1 is a schematic structural diagram of a resource gateway in an embodiment of the present application;
图2~图7为本申请实施例中资源访问授权方法的流程图。2 to 7 are flowcharts of a resource access authorization method in an embodiment of the present application.
本申请实施例通过提供一种资源网关、及资源访问授权方法,解决了现有技术中资源使用者在获取资源的访问码时,需要对资源拥有者进行两次API调用的技术问题。The embodiment of the present application solves the technical problem that the resource user needs to make two API calls to the resource owner when acquiring the access code of the resource in the prior art by providing a resource gateway and a resource access authorization method.
本申请实施例的技术方案为解决上述技术问题,总体思路如下:The technical solution of the embodiment of the present application is to solve the above technical problem, and the general idea is as follows:
一种资源网关,包括:第一网络接口、以及第二网络接口;存储器,用于存储程序代码;处理器,与存储器、第一网络接口、以及第二网络接口连接,用于读取存储器中的程序代码,执行:通过第一网络接口接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,第一请求是资源使用者根据资源网关提供的第一API生成的;根据第一请求,并通过第二网络接口从第一资源的资源拥有者获取第一资源的授权码;根据资源拥有者提供的第一资源的授权码,并通过第二网络接口从第一资源的资源拥有者获取第一资源的访问码;通过第一网络接口将第一资源的访问码返回给资源使用者。A resource gateway includes: a first network interface and a second network interface; a memory for storing program code; a processor, connected to the memory, the first network interface, and the second network interface, for reading in the memory The program code is configured to: receive, by using the first network interface, a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway. Obtaining, according to the first request, the authorization code of the first resource from the resource owner of the first resource through the second network interface; according to the authorization code of the first resource provided by the resource owner, and from the first through the second network interface The resource owner of the resource obtains the access code of the first resource; and returns the access code of the first resource to the resource user through the first network interface.
由于,资源网关将其第一API开放给资源使用者,资源使用者在需要获取第一资源的访问码时,只需基于第一API生成第一请求并发送给资源网关(即:只进行了一次API调用),便实现了获取第一资源的访问码。所以,有效解决了现有技术中资源使用者在获取资源的访问码时,需要进行两次API调用的技术问题,实现了资源使用者只需针对资源网关进行一次API调用,就可以通过资源网关获取资源的访问码,从而减少了资源使用者进行API调用的次数,给资源使用者带来了便利的技术效果。
Because the resource gateway opens its first API to the resource user, when the resource user needs to obtain the access code of the first resource, the resource user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only the An API call) implements the access code for the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user only needs to make an API call to the resource gateway, and then the resource gateway can be used. Obtain the access code of the resource, thereby reducing the number of times the resource user makes API calls, and bringing convenient technical effects to the resource user.
为使本申请一实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the objectives, technical solutions, and advantages of the embodiments of the present application more clearly, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the drawings in the embodiments of the present application. Examples are some embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present invention.
首先说明,本文中出现的术语“第一资源”或“资源”,是指能够实现某一特定业务的特定API,在该特定API被调用时,提供该特定API的应用程序能够实现该特定业务。First of all, the term "first resource" or "resource" as used herein refers to a specific API capable of implementing a specific service, and when the specific API is called, an application providing the specific API can implement the specific service. .
其次说明,本文中出现的术语“资源拥有者”,是指能够提供该特定API的应用程序,例如:社交类应用程序、购物类应用程序等等,对于资源拥有者具体是何种应用程序,本申请实施例不做具体限制。Secondly, the term "resource owner" as used in this article refers to an application that can provide the specific API, such as a social application, a shopping application, etc., and what kind of application is specific to the resource owner, The embodiments of the present application are not specifically limited.
再次说明,本文中出现的术语“资源使用者”,是指调用该特定API的其他应用程序。Again, the term "resource consumer" as used in this article refers to other applications that call that particular API.
实施例一Embodiment 1
如图1所示,本实施例提供一种资源网关,包括:As shown in FIG. 1 , this embodiment provides a resource gateway, including:
第一网络接口110、以及第二网络接口120;a first network interface 110, and a second network interface 120;
存储器130,用于存储程序代码;a memory 130, configured to store program code;
一个或多个处理器140,与存储器130、第一网络接口110、以及第二网络接口120连接,用于读取存储器130中的程序代码,执行:One or more processors 140 are coupled to the memory 130, the first network interface 110, and the second network interface 120 for reading program code in the memory 130, and executing:
通过第一网络接口110接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,第一请求是资源使用者根据资源网关提供的第一API生成的;根据第一请求,并通过第二网络接口120从第一资源的资源拥有者获取第一资源的授权码;根据资源拥有者提供的第一资源的授权码,并通过第二网络接口120从第一资源的资源拥有者获取第一资源的访问码;通过第一网络接口110将第一资源的访问码返回给资源使用者。Receiving, by the first network interface 110, a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway; according to the first request Obtaining, by the second network interface 120, the authorization code of the first resource from the resource owner of the first resource; the resource of the first resource according to the authorization code of the first resource provided by the resource owner, and the resource of the first resource by using the second network interface 120 The owner obtains the access code of the first resource; and returns the access code of the first resource to the resource user through the first network interface 110.
在具体实施过程中,第一资源为资源拥有者为资源使用者提供的,且能够实现某一特定业务的特定API。资源使用者可以调用该特定API,从而通过资源拥有者实现该特定业务。例如,在资源拥有者为微博类应用程序时,第一资源可以是通过微博类应用程序进行信息发布的API。In a specific implementation process, the first resource is a specific API provided by the resource owner for the resource user and capable of implementing a specific service. The resource consumer can call this particular API to implement that particular service through the resource owner. For example, when the resource owner is a Weibo-like application, the first resource may be an API for publishing information through a Weibo-like application.
在本实施例中,由于资源网关将其第一API开放给资源使用者,资源使
用者在需要获取第一资源的访问码时,只需基于第一API生成第一请求并发送给资源网关(即:只进行了一次API调用),便实现了获取第一资源的访问码。所以,有效解决了现有技术中资源使用者在获取资源的访问码时,需要进行两次API调用的技术问题,实现了资源使用者只需针对资源网关进行一次API调用,就可以通过该资源网关获取资源的访问码,从而减少了资源使用者进行API调用的次数,给资源使用者带来了便利的技术效果。In this embodiment, since the resource gateway opens its first API to the resource user, the resource enables
When the user needs to obtain the access code of the first resource, the user only needs to generate the first request based on the first API and send it to the resource gateway (ie, only one API call is made), thereby realizing the access code for acquiring the first resource. Therefore, the technical problem that the resource user needs to perform two API calls when acquiring the access code of the resource in the prior art is effectively solved, and the resource user can pass the resource by only making an API call to the resource gateway. The gateway obtains the access code of the resource, thereby reducing the number of times the resource user makes the API call, and brings a convenient technical effect to the resource user.
在具体实施过程中,资源网关可以通过第一网络接口与多个资源使用者连接,通过第二网络接口与多个资源拥有者连接。且,在资源拥有者发送的第一请求中应包含第一资源的资源拥有者的标签,此时,处理器140还用于:通过该标签,确定第一资源的资源拥有者,从而从该资源拥有者处获取第一资源的访问码。In a specific implementation process, the resource gateway may be connected to multiple resource users through the first network interface, and connected to multiple resource owners through the second network interface. The first request sent by the resource owner should include the label of the resource owner of the first resource. In this case, the processor 140 is further configured to: determine, by using the label, the resource owner of the first resource, thereby The resource owner obtains the access code of the first resource.
对于资源使用者来讲,在现有技术中,一个资源使用者需要对接多个资源拥有者,以获取不同的资源拥有者提供的不同的资源,但这给资源使用者带来了大量的接口维护工作。而,在本实施例中,资源使用者只需和资源网关对接即可,实现了减少资源使用者的接口维护工作,降低接入难度,同时降低对接风险的技术效果。For resource users, in the prior art, one resource user needs to connect multiple resource owners to obtain different resources provided by different resource owners, but this brings a large number of interfaces to resource users. maintenance work. In this embodiment, the resource user only needs to connect with the resource gateway, thereby reducing the interface maintenance work of the resource user, reducing the access difficulty, and reducing the technical effect of the docking risk.
对于资源拥有者来讲,在现有技术中,一个资源拥有者需要对接多个资源使用者,以向不同的资源使用者提供资源,但这给资源拥有者带来了大量的接口维护工作。而,在本实施例中,资源拥有者只需和资源网关对接即可,实现了减少资源拥有者的接口维护工作,同时降低对接风险的技术效果。For resource owners, in the prior art, a resource owner needs to connect multiple resource users to provide resources to different resource users, but this brings a lot of interface maintenance work to resource owners. However, in this embodiment, the resource owner only needs to connect with the resource gateway, thereby reducing the technical maintenance effect of reducing the resource owner's interface maintenance work and reducing the docking risk.
在具体实施过程中,不同的资源拥者在向资源使用者提供资源的访问码时,所遵循协议可能不同(例如:有些资源拥有者遵循OAUTH 1.0协议,而有些资源拥有者遵循OAUTH 2.0协议)。所以,在存储器130中还存储有不同的资源拥有者分别遵循的协议,此时,处理器140还用于:在收到资源使用者发来的第一请求后,基于第一请求中的资源拥有者的标签,从存储器130中获取该资源拥有者遵循的协议,并基于该协议,从该资源拥有者处获取资源的访问码。In the specific implementation process, different resource owners may have different protocols when providing access codes to resource users (for example, some resource owners follow the OAUTH 1.0 protocol, and some resource owners follow the OAUTH 2.0 protocol). . Therefore, the memory 130 is further configured with different protocols that the resource owners respectively follow. In this case, the processor 140 is further configured to: after receiving the first request sent by the resource user, based on the resources in the first request. The owner's tag retrieves the protocol followed by the resource owner from the memory 130 and, based on the protocol, obtains the access code of the resource from the resource owner.
在本实施例中,资源使用者在获取资源的访问码时,只需基于资源网关所提供的第一API,向资源网关放发送第一请求即可,不需要资源使用者了解不同资源拥有者所遵循的协议,给资源使用者带来了便利。
In this embodiment, the resource user only needs to send the first request to the resource gateway based on the first API provided by the resource gateway when acquiring the access code of the resource, and does not need the resource user to understand different resource owners. The protocols followed provide convenience to resource users.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
根据第一请求、以及第一资源的资源拥有者提供的第二API,生成用于请求获取第一资源的授权码的第二请求;通过第二网络接口120将第二请求发送给资源拥有者;通过第二网络接口120接收资源拥有者返回的第一资源的授权码。Generating a second request for requesting acquisition of an authorization code of the first resource according to the first request and the second API provided by the resource owner of the first resource; transmitting the second request to the resource owner through the second network interface 120 Receiving, by the second network interface 120, an authorization code of the first resource returned by the resource owner.
在具体实施过程中,资源拥有者在接收到第二请求后,会向资源使用者获取一认证信息(例如:用户名称、以及对应的用户密码),并验证该认证信息是否与资源拥有者存储的认证信息一致,若一致,则确定资源使用者为合法用户,并向资源网关返回第一资源的授权码。In a specific implementation process, after receiving the second request, the resource owner obtains an authentication information (for example, a user name and a corresponding user password) from the resource user, and verifies whether the authentication information is stored with the resource owner. The authentication information is consistent. If they are consistent, the resource user is determined to be a legitimate user, and the authorization code of the first resource is returned to the resource gateway.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
根据第一资源的授权码、以及第一资源的资源拥有者提供的第三API,生成用于请求获取第一资源的访问码的第三请求,其中,第三请求中包含第一资源的授权码;通过第二网络接口120将第三请求发送给资源拥有者;通过第二网络接口120接收资源拥有者返回的第一资源的访问码。Generating, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, a third request for requesting to acquire an access code of the first resource, where the third request includes the authorization of the first resource And transmitting, by the second network interface 120, the third request to the resource owner; and receiving, by the second network interface 120, the access code of the first resource returned by the resource owner.
在现有技术中,资源使用者与资源拥有者直接进行通信,资源使用者首先要基于资源使用者提供的第二API,向资源拥有者发送用于获取第一资源的授权码的请求(即:进行第一次API调用),在资源使用者获取到第一资源的授权码后,资源使用者再基于第一资源的授权码、以及资源拥有者提供的第三API,向资源拥有者发送用于获取第一资源的访问码的请求(即:进行第二次API调用),从而获得第一资源的访问码。In the prior art, the resource user directly communicates with the resource owner, and the resource user first sends a request for acquiring the authorization code of the first resource to the resource owner based on the second API provided by the resource user (ie, : performing the first API call), after the resource user obtains the authorization code of the first resource, the resource user sends the resource identifier to the resource owner based on the authorization code of the first resource and the third API provided by the resource owner. A request for acquiring an access code of the first resource (ie, making a second API call), thereby obtaining an access code of the first resource.
而,在本实施例中,由资源网关基于资源拥有者提供的第二API,生成用于请求获取第一资源的授权码的第二请求(即:由资源网关进行调用第二API,以获取第一资源的授权码),在资源网关获取到第一资源的授权码后,资源网关再基于第一资源的授权码、以及资源拥有者提供的第三API,向资源拥有者发送用于获取第一资源的访问码的请求(即:由资源网关进行调用第三API,以获取第一资源的访问码),并将获得的第一资源的访问码返回给资源使用者,进而减少了资源使用者进行API调用的次数,为资源使用者带来了便利。In this embodiment, the resource gateway generates a second request for requesting to acquire the authorization code of the first resource based on the second API provided by the resource owner (ie, calling the second API by the resource gateway to obtain After the resource gateway obtains the authorization code of the first resource, the resource gateway sends the resource identifier to the resource owner based on the authorization code of the first resource and the third API provided by the resource owner. The request for the access code of the first resource (ie, the third API is invoked by the resource gateway to obtain the access code of the first resource), and the obtained access code of the first resource is returned to the resource user, thereby reducing resources. The number of times the user makes API calls brings convenience to resource users.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
在通过第一网络接口110将第一资源的访问码返回给资源使用者之前,
在第一资源的访问码的格式为第一格式时,将第一资源的访问码的格式由第一格式转换为第一预定格式,其中,第一格式为与第一预定格式不同的任一格式。Before returning the access code of the first resource to the resource user through the first network interface 110,
And when the format of the access code of the first resource is the first format, converting the format of the access code of the first resource from the first format to the first predetermined format, where the first format is any one different from the first predetermined format format.
在现有技术中,各个资源拥有者所提供的资源的访问码可能有多种不同的格式,这给资源使用者在解析资源的访问码时带来了不便利。而,在本实施例中,资源网关将资源拥有者返回的第一资源的访问码的格式转化为第一预定格式,从而统一了资源的访问码的格式,实现了资源使用者可以从不同的资源拥有者获得格式一致的资源的访问码,从而方便了资源使用者对资源的访问码进行解析的技术效果。In the prior art, the access codes of the resources provided by the resource owners may have multiple different formats, which brings inconvenience to the resource users in resolving the access codes of the resources. In this embodiment, the resource gateway converts the format of the access code of the first resource returned by the resource owner into the first predetermined format, thereby unifying the format of the access code of the resource, and realizing that the resource user can be different. The resource owner obtains the access code of the resource with the same format, thereby facilitating the technical effect of the resource user analyzing the access code of the resource.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
在根据第一请求,从第一资源的资源拥有者获取第一资源的授权码之后,根据资源拥有者提供的第一资源的授权码,并通过第二网络接口120从第一资源的资源拥有者获取第一资源的刷新码;通过第一网络接口110将第一资源的刷新码返回给资源使用者。After obtaining the authorization code of the first resource from the resource owner of the first resource according to the first request, according to the authorization code of the first resource provided by the resource owner, and from the resource of the first resource through the second network interface 120 The method obtains a refresh code of the first resource, and returns a refresh code of the first resource to the resource user through the first network interface 110.
在具体实施过程中,第一资源的访问可能具有有效期(例如:24小时、或48小时等等),这就使得资源使用者必须在该有效期内,基于第一资源的访问码访问资源拥有者,并对第一资源进行使用。若第一资源的访问码超过了有效期,则需要根据第一资源的刷新码对第一资源的访问码进行刷新,以获得刷新后的第一资源的访问码。In a specific implementation process, the access of the first resource may have an expiration date (for example: 24 hours, or 48 hours, etc.), so that the resource user must access the resource owner based on the access code of the first resource during the validity period. And use the first resource. If the access code of the first resource exceeds the validity period, the access code of the first resource needs to be refreshed according to the refresh code of the first resource to obtain an access code of the first resource after the refresh.
在具体实施过程中,在资源网关接收资源拥有者返回的第一资源的访问码的同时,资源网关还会接收到资源拥有者提供的第一资源的刷新码,资源网关会将第一资源的刷新码连同第一资源的访问码一起发给了资源使用者,从而实现了资源使用者能够根据第一资源的刷新码对第一资源的访问码进行刷新的技术效果。In a specific implementation process, when the resource gateway receives the access code of the first resource returned by the resource owner, the resource gateway also receives the refresh code of the first resource provided by the resource owner, and the resource gateway will use the first resource. The refresh code is sent to the resource user along with the access code of the first resource, thereby implementing the technical effect that the resource user can refresh the access code of the first resource according to the refresh code of the first resource.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
在通过第一网络接口110将第一资源的刷新码返回给资源使用者之前,在第一资源的刷新码的格式为第二格式时,将第一资源的刷新码的格式由第二格式转换为第二预定格式,其中,第二格式为与第二预定格式不同的任一格式。Before returning the refresh code of the first resource to the resource user through the first network interface 110, when the format of the refresh code of the first resource is the second format, converting the format of the refresh code of the first resource by the second format Is a second predetermined format, wherein the second format is any format different from the second predetermined format.
在现有技术中,各个资源拥有者所提供的资源的刷新码可能会有多种不
同的格式,这给资源使用者在解析资源的刷新码时带来了不便利。而,在本申请实施例中,资源网关将资源拥有者返回的第一资源的刷新码的格式转化为第二预定格式,从而统一了第一资源的刷新码的格式,实现了资源使用者可以从不同的资源拥有者获得格式一致的第一资源的刷新码,从而方便了资源使用者对第一资源的刷新码进行解析的技术效果。In the prior art, the refresh code of the resources provided by each resource owner may have multiple types.
The same format, which brings inconvenience to the resource user in resolving the refresh code of the resource. In the embodiment of the present application, the resource gateway converts the format of the refresh code of the first resource returned by the resource owner into a second predetermined format, thereby unifying the format of the refresh code of the first resource, thereby realizing that the resource user can The refresh code of the first resource with the same format is obtained from different resource owners, thereby facilitating the technical effect of the resource user analyzing the refresh code of the first resource.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
在通过第一网络接口110将第一资源的刷新码返回给资源使用者之后,接收资源使用者发来的用于请求刷新第一资源的访问码的第四请求,第四请求是资源使用者根据第一资源的刷新码、以及资源网关提供的第四API生成的,其中,第四请求中包含第一资源的刷新码;在确定资源拥有者支持刷新第一资源的访问码后,根据第四请求,并通过第二网络接口120从资源拥有者获取刷新后的第一资源的访问码;通过第一网络接口110将刷新后的第一资源的访问码返回给资源使用者。After returning the refresh code of the first resource to the resource user through the first network interface 110, receiving a fourth request sent by the resource user for requesting to refresh the access code of the first resource, where the fourth request is a resource user And generating, according to the refresh code of the first resource, and the fourth API provided by the resource gateway, where the fourth request includes a refresh code of the first resource; after determining that the resource owner supports updating the access code of the first resource, And requesting, by using the second network interface 120, the access code of the refreshed first resource from the resource owner; and returning, by the first network interface 110, the updated access code of the first resource to the resource user.
在具体实施过程中,资源网关还将其第四API对资源使用者开放,第四API用于控制资源网关对第一资源的访问码进行刷新,从而实现了资源使用者能够凭借第一资源的刷新码对第一资源的访问码进行刷新的技术效果。In the specific implementation process, the resource gateway further opens its fourth API to the resource user, and the fourth API is used to control the resource gateway to refresh the access code of the first resource, thereby realizing that the resource user can rely on the first resource. The technical effect of refreshing the access code of the first resource by the refresh code.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
根据第一资源的刷新码、以及第一资源的资源拥有者提供的第五API,生成用于请求刷新第一资源的访问码的第五请求,其中,第五请求中包含第一资源的刷新码;通过第二网络接口120将第五请求发送给资源拥有者;通过第二网络接口120接收资源拥有者返回的刷新后的第一资源的访问码。Generating, according to the refresh code of the first resource, and the fifth API provided by the resource owner of the first resource, a fifth request for requesting to refresh the access code of the first resource, where the fifth request includes the refresh of the first resource And transmitting, by the second network interface 120, the fifth request to the resource owner; and receiving, by the second network interface 120, the access code of the refreshed first resource returned by the resource owner.
可选地,在本实施例中,处理器140,还用于:Optionally, in this embodiment, the processor 140 is further configured to:
在根据第一资源的刷新码、以及第一资源的资源拥有者提供的第五API,生成用于请求刷新第一资源的访问码的第五请求之前,将第一资源的刷新码的格式由第二预定格式转换为第二格式。Before generating the fifth request for requesting to refresh the access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, the format of the refresh code of the first resource is determined by The second predetermined format is converted to the second format.
在具体实施过程中,由于资源拥有者所能够识别的第一资源的刷新码的格式为第二格式,所以,资源网关先第一资源的刷新码的格式由第二预定格式转换为第二格式,再根据第一资源的刷新码、以及第一资源的资源拥有者提供的第五API,生成用于请求刷新第一资源的访问码的第五请求。In a specific implementation process, since the format of the refresh code of the first resource that the resource owner can identify is the second format, the format of the refresh code of the first resource of the resource gateway is converted from the second predetermined format to the second format. And generating, according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, a fifth request for requesting to refresh the access code of the first resource.
实施例二
Embodiment 2
基于同一发明构思,本申请提供一种资源访问授权方法,如图2所示,包括:Based on the same inventive concept, the present application provides a resource access authorization method, as shown in FIG. 2, including:
步骤101:资源网关接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,第一请求是资源使用者根据资源网关提供的第一API生成的;Step 101: The resource gateway receives a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway.
步骤102:资源网关根据第一请求,从第一资源的资源拥有者获取第一资源的授权码;Step 102: The resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request.
步骤103a:资源网关根据资源拥有者提供的第一资源的授权码,从第一资源的资源拥有者获取第一资源的访问码; Step 103a: The resource gateway acquires an access code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner.
步骤104b:资源网关将第一资源的访问码返回给资源使用者。 Step 104b: The resource gateway returns the access code of the first resource to the resource user.
可选地,在本实施例中,如图3所示,步骤102,包括:Optionally, in this embodiment, as shown in FIG. 3, step 102 includes:
步骤201:资源网关根据第一请求、以及第一资源的资源拥有者提供的第二API,生成用于请求获取第一资源的授权码的第二请求;Step 201: The resource gateway generates a second request for requesting to acquire an authorization code of the first resource according to the first request and the second API provided by the resource owner of the first resource.
步骤202:资源网关将第二请求发送给资源拥有者;Step 202: The resource gateway sends the second request to the resource owner.
步骤203:资源网关接收资源拥有者返回的第一资源的授权码。Step 203: The resource gateway receives an authorization code of the first resource returned by the resource owner.
可选地,在本实施例中,如图4所示,步骤103a,包括:Optionally, in this embodiment, as shown in FIG. 4, step 103a includes:
步骤301:资源网关根据第一资源的授权码、以及第一资源的资源拥有者提供的第三API,生成用于请求获取第一资源的访问码的第三请求,其中,第三请求中包含第一资源的授权码;Step 301: The resource gateway generates a third request for requesting to acquire an access code of the first resource according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, where the third request includes The authorization code of the first resource;
步骤302:资源网关将第三请求发送给资源拥有者;Step 302: The resource gateway sends the third request to the resource owner.
步骤303:资源网关接收资源拥有者返回的第一资源的访问码。Step 303: The resource gateway receives an access code of the first resource returned by the resource owner.
可选地,在本实施例中,在步骤104a之前,该方法还包括:Optionally, in this embodiment, before step 104a, the method further includes:
在第一资源的访问码的格式为第一格式时,资源网关将第一资源的访问码的格式由第一格式转换为第一预定格式,其中,第一格式为与第一预定格式不同的任一格式。When the format of the access code of the first resource is the first format, the resource gateway converts the format of the access code of the first resource from the first format to the first predetermined format, where the first format is different from the first predetermined format. Any format.
可选地,在本实施例中,如图5所示,在步骤102之后,该方法还包括:Optionally, in this embodiment, as shown in FIG. 5, after step 102, the method further includes:
步骤103b:资源网关根据资源拥有者提供的第一资源的授权码,从第一资源的资源拥有者获取第一资源的刷新码; Step 103b: The resource gateway acquires a refresh code of the first resource from the resource owner of the first resource according to the authorization code of the first resource provided by the resource owner.
步骤104b:资源网关将第一资源的刷新码返回给资源使用者。 Step 104b: The resource gateway returns the refresh code of the first resource to the resource user.
可选地,在本实施例中,在步骤104b之前,该方法还包括:
Optionally, in this embodiment, before step 104b, the method further includes:
在第一资源的刷新码的格式为第二格式时,资源网关将第一资源的刷新码的格式由第二格式转换为第二预定格式,其中,第二格式为与第二预定格式不同的任一格式。When the format of the refresh code of the first resource is the second format, the resource gateway converts the format of the refresh code of the first resource from the second format to the second predetermined format, where the second format is different from the second predetermined format. Any format.
可选地,在本实施例中,如图6所示,在步骤104b之后,该方法还包括:Optionally, in this embodiment, as shown in FIG. 6, after step 104b, the method further includes:
步骤105:资源网关接收资源使用者发来的用于请求刷新第一资源的访问码的第四请求,第四请求是资源使用者根据第一资源的刷新码、以及资源网关提供的第四API生成的,其中,第四请求中包含第一资源的刷新码;Step 105: The resource gateway receives a fourth request sent by the resource user for requesting to refresh the access code of the first resource, where the fourth request is a refresh code of the resource resource according to the first resource, and a fourth API provided by the resource gateway. The generated, wherein the fourth request includes a refresh code of the first resource;
步骤106:在资源网关确定资源拥有者支持刷新第一资源的访问码后,资源网关根据第四请求,从资源拥有者获取刷新后的第一资源的访问码;Step 106: After the resource gateway determines that the resource owner supports the refreshing of the access code of the first resource, the resource gateway acquires the access code of the refreshed first resource from the resource owner according to the fourth request.
步骤107:资源网关将刷新后的第一资源的访问码返回给资源使用者。Step 107: The resource gateway returns the refreshed access code of the first resource to the resource user.
可选地,在本实施例中,如图7所示,步骤106,包括:Optionally, in this embodiment, as shown in FIG. 7, step 106 includes:
步骤401:资源网关根据第一资源的刷新码、以及第一资源的资源拥有者提供的第五API,生成用于请求刷新第一资源的访问码的第五请求,其中,第五请求中包含第一资源的刷新码;Step 401: The resource gateway generates a fifth request for requesting to refresh the access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, where the fifth request includes The refresh code of the first resource;
步骤402:资源网关将第五请求发送给资源拥有者;Step 402: The resource gateway sends the fifth request to the resource owner.
步骤403:资源网关接收资源拥有者返回的刷新后的第一资源的访问码。Step 403: The resource gateway receives the access code of the refreshed first resource returned by the resource owner.
可选地,在本实施例中,在步骤401之前,该方法还包括:Optionally, in this embodiment, before step 401, the method further includes:
资源网关将第一资源的刷新码的格式由第二预定格式转换为第二格式。The resource gateway converts the format of the refresh code of the first resource from the second predetermined format to the second format.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实
现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Yu Shi
A flow diagram of a process or a plurality of processes and/or a block diagram of a function of a function specified in a block or blocks.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
It is apparent that those skilled in the art can make various modifications and variations to the invention without departing from the spirit and scope of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the invention
Claims (18)
- 一种资源网关,其特征在于,包括:A resource gateway, comprising:第一网络接口、以及第二网络接口;a first network interface and a second network interface;存储器,用于存储程序代码;a memory for storing program code;处理器,与所述存储器、所述第一网络接口、以及所述第二网络接口连接,用于读取所述存储器中的所述程序代码,执行:a processor, configured to interface with the memory, the first network interface, and the second network, to read the program code in the memory, and execute:通过所述第一网络接口接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,所述第一请求是所述资源使用者根据所述资源网关提供的第一API生成的;根据所述第一请求,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的授权码;根据所述资源拥有者提供的所述第一资源的授权码,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的访问码;通过所述第一网络接口将所述第一资源的访问码返回给所述资源使用者。Receiving, by the first network interface, a first request for requesting to acquire an access code of the first resource, where the first request is a first API provided by the resource user according to the resource gateway Generating; according to the first request, obtaining an authorization code of the first resource from a resource owner of the first resource by using the second network interface; according to the first provided by the resource owner An authorization code of the resource, and obtaining, by the second network interface, an access code of the first resource from a resource owner of the first resource; returning an access code of the first resource by using the first network interface To the resource user.
- 如权利要求1所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to claim 1, wherein the processor is further configured to:根据所述第一请求、以及所述第一资源的资源拥有者提供的第二API,生成用于请求获取所述第一资源的授权码的第二请求;通过所述第二网络接口将所述第二请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的所述第一资源的授权码。Generating, according to the first request, and the second API provided by the resource owner of the first resource, a second request for requesting to acquire an authorization code of the first resource; Transmitting the second request to the resource owner; receiving, by the second network interface, an authorization code of the first resource returned by the resource owner.
- 如权利要求1~2任一所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to any one of claims 1 to 2, wherein the processor is further configured to:根据所述第一资源的授权码、以及所述第一资源的资源拥有者提供的第三API,生成用于请求获取所述第一资源的访问码的第三请求,其中,所述第三请求中包含所述第一资源的授权码;通过所述第二网络接口将所述第三请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的所述第一资源的访问码。Generating, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, a third request for requesting to acquire an access code of the first resource, where the third The request includes an authorization code of the first resource; the third request is sent to the resource owner by the second network interface; and the returned by the resource owner is received by the second network interface The access code of the first resource.
- 如权利要求1~3任一所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to any one of claims 1 to 3, wherein the processor is further configured to:在所述通过所述第一网络接口将所述第一资源的访问码返回给所述资源使用者之前,在所述第一资源的访问码的格式为第一格式时,将所述第一资源的访问码的格式由所述第一格式转换为第一预定格式,其中,所述第一 格式为与所述第一预定格式不同的任一格式。Before the access code of the first resource is returned to the resource user by using the first network interface, when the format of the access code of the first resource is the first format, the first The format of the access code of the resource is converted from the first format to a first predetermined format, wherein the first The format is any format different from the first predetermined format.
- 如权利要求1~4任一所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to any one of claims 1 to 4, wherein the processor is further configured to:在所述根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码之后,根据所述资源拥有者提供的所述第一资源的授权码,并通过所述第二网络接口从所述第一资源的资源拥有者获取所述第一资源的刷新码;通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者。After obtaining the authorization code of the first resource from the resource owner of the first resource according to the first request, according to the authorization code of the first resource provided by the resource owner, and passing The second network interface acquires a refresh code of the first resource from a resource owner of the first resource, and returns a refresh code of the first resource to the resource user by using the first network interface.
- 如权利要求5所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to claim 5, wherein the processor is further configured to:在所述通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者之前,在所述第一资源的刷新码的格式为第二格式时,将所述第一资源的刷新码的格式由所述第二格式转换为第二预定格式,其中,所述第二格式为与所述第二预定格式不同的任一格式。Before the refresh code of the first resource is returned to the resource user by using the first network interface, when the format of the refresh code of the first resource is the second format, the first The format of the refresh code of the resource is converted from the second format to a second predetermined format, wherein the second format is any format different from the second predetermined format.
- 如权利要求5~6任一所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to any one of claims 5 to 6, wherein the processor is further configured to:在所述通过所述第一网络接口将所述第一资源的刷新码返回给所述资源使用者之后,接收所述资源使用者发来的用于请求刷新第一资源的访问码的第四请求,所述第四请求是所述资源使用者根据所述第一资源的刷新码、以及所述资源网关提供的第四API生成的,其中,所述第四请求中包含所述第一资源的刷新码;在确定所述资源拥有者支持刷新第一资源的访问码后,根据所述第四请求,并通过所述第二网络接口从所述资源拥有者获取刷新后的第一资源的访问码;通过所述第一网络接口将所述刷新后的第一资源的访问码返回给所述资源使用者。Receiving, by the first network interface, the refresh code of the first resource to the resource user, receiving, by the resource user, a fourth request for refreshing an access code of the first resource a request, the fourth request is generated by the resource user according to the refresh code of the first resource, and a fourth API provided by the resource gateway, where the fourth request includes the first resource Refreshing code; after determining that the resource owner supports refreshing the access code of the first resource, acquiring, according to the fourth request, the first resource that is refreshed from the resource owner by using the second network interface And accessing the updated access code of the first resource to the resource user by using the first network interface.
- 如权利要求7所述的资源网关,其特征在于,所述处理器,还用于:The resource gateway according to claim 7, wherein the processor is further configured to:根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求,其中,所述第五请求中包含所述第一资源的刷新码;通过所述第二网络接口将所述第五请求发送给所述资源拥有者;通过所述第二网络接口接收所述资源拥有者返回的刷新后的所述第一资源的访问码。Generating a fifth request for requesting to refresh an access code of the first resource according to a refresh code of the first resource and a fifth API provided by a resource owner of the first resource, where the fifth The request includes a refresh code of the first resource; the fifth request is sent to the resource owner by using the second network interface; and the refreshed by the resource owner is received by the second network interface The access code of the first resource.
- 如权利要求8所述的资源网关,其特征在于,所述处理器,还用于: The resource gateway according to claim 8, wherein the processor is further configured to:在所述根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求之前,将所述第一资源的刷新码的格式由所述第二预定格式转换为所述第二格式。Before generating the fifth request for requesting to refresh the access code of the first resource, according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, The format of the refresh code of the first resource is converted into the second format by the second predetermined format.
- 一种资源访问授权方法,其特征在于,包括:A resource access authorization method, comprising:资源网关接收资源使用者发来的用于请求获取第一资源的访问码的第一请求,所述第一请求是所述资源使用者根据所述资源网关提供的第一API生成的;Receiving, by the resource gateway, a first request for requesting to acquire an access code of the first resource, where the first request is generated by the resource user according to the first API provided by the resource gateway;所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码;And obtaining, by the resource gateway, an authorization code of the first resource from a resource owner of the first resource according to the first request;所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的访问码;The resource gateway acquires an access code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;所述资源网关将所述第一资源的访问码返回给所述资源使用者。The resource gateway returns an access code of the first resource to the resource user.
- 如权利要求10所述的方法,其特征在于,所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码,包括:The method according to claim 10, wherein the resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request, including:所述资源网关根据所述第一请求、以及所述第一资源的资源拥有者提供的第二API,生成用于请求获取所述第一资源的授权码的第二请求;The resource gateway generates a second request for requesting to acquire an authorization code of the first resource according to the first request and a second API provided by a resource owner of the first resource;所述资源网关将所述第二请求发送给所述资源拥有者;Transmitting, by the resource gateway, the second request to the resource owner;所述资源网关接收所述资源拥有者返回的所述第一资源的授权码。The resource gateway receives an authorization code of the first resource returned by the resource owner.
- 如权利要求10~11任一所述的方法,其特征在于,所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的访问码,包括:The method according to any one of claims 10 to 11, wherein the resource gateway acquires the resource owner of the first resource according to an authorization code of the first resource provided by the resource owner. The access code of the first resource, including:所述资源网关根据所述第一资源的授权码、以及所述第一资源的资源拥有者提供的第三API,生成用于请求获取所述第一资源的访问码的第三请求,其中,所述第三请求中包含所述第一资源的授权码;The resource gateway generates a third request for requesting to acquire an access code of the first resource, according to the authorization code of the first resource and the third API provided by the resource owner of the first resource, where The third request includes an authorization code of the first resource;所述资源网关将所述第三请求发送给所述资源拥有者;Transmitting, by the resource gateway, the third request to the resource owner;所述资源网关接收所述资源拥有者返回的所述第一资源的访问码。The resource gateway receives an access code of the first resource returned by the resource owner.
- 如权利要求10~12任一所述的方法,其特征在于,在所述资源网关将所述第一资源的访问码返回给所述资源使用者之前,所述方法还包括:The method according to any one of claims 10 to 12, wherein before the resource gateway returns the access code of the first resource to the resource user, the method further includes:在所述第一资源的访问码的格式为第一格式时,所述资源网关将所述第一资源的访问码的格式由所述第一格式转换为第一预定格式,其中,所述第 一格式为与所述第一预定格式不同的任一格式。When the format of the access code of the first resource is the first format, the resource gateway converts the format of the access code of the first resource from the first format to a first predetermined format, where the One format is any format that is different from the first predetermined format.
- 如权利要求10~13任一所述的方法,其特征在于,在所述资源网关根据所述第一请求,从所述第一资源的资源拥有者获取所述第一资源的授权码之后,所述方法还包括:The method according to any one of claims 10 to 13, wherein after the resource gateway acquires an authorization code of the first resource from a resource owner of the first resource according to the first request, The method further includes:所述资源网关根据所述资源拥有者提供的所述第一资源的授权码,从所述第一资源的资源拥有者获取所述第一资源的刷新码;The resource gateway acquires a refresh code of the first resource from a resource owner of the first resource according to an authorization code of the first resource provided by the resource owner;所述资源网关将所述第一资源的刷新码返回给所述资源使用者。The resource gateway returns a refresh code of the first resource to the resource user.
- 如权利要求14所述的方法,其特征在于,在所述资源网关将所述第一资源的刷新码返回给所述资源使用者之前,所述方法还包括:The method of claim 14, wherein before the resource gateway returns the refresh code of the first resource to the resource user, the method further includes:在所述第一资源的刷新码的格式为第二格式时,所述资源网关将所述第一资源的刷新码的格式由所述第二格式转换为第二预定格式,其中,所述第二格式为与所述第二预定格式不同的任一格式。When the format of the refresh code of the first resource is the second format, the resource gateway converts the format of the refresh code of the first resource from the second format to a second predetermined format, where the The second format is any format different from the second predetermined format.
- 如权利要求14~15任一所述的方法,其特征在于,在所述资源网关将所述第一资源的刷新码返回给所述资源使用者之后,所述方法还包括:The method according to any one of claims 14 to 15, wherein after the resource gateway returns the refresh code of the first resource to the resource user, the method further includes:所述资源网关接收所述资源使用者发来的用于请求刷新第一资源的访问码的第四请求,所述第四请求是所述资源使用者根据所述第一资源的刷新码、以及所述资源网关提供的第四API生成的,其中,所述第四请求中包含所述第一资源的刷新码;Receiving, by the resource user, a fourth request for requesting to refresh an access code of the first resource, where the fourth request is a refresh code of the resource resource according to the first resource, and The fourth API provided by the resource gateway, where the fourth request includes a refresh code of the first resource;在所述资源网关确定所述资源拥有者支持刷新第一资源的访问码后,所述资源网关根据所述第四请求,从所述资源拥有者获取刷新后的第一资源的访问码;After the resource gateway determines that the resource owner supports the refresh of the access code of the first resource, the resource gateway acquires the access code of the first resource after the refresh from the resource owner according to the fourth request;所述资源网关将所述刷新后的第一资源的访问码返回给所述资源使用者。The resource gateway returns an access code of the refreshed first resource to the resource user.
- 如权利要求16所述的方法,其特征在于,所述资源网关根据所述第四请求,从所述第一资源的资源拥有者获取刷新后的第一资源的访问码,包括:The method of claim 16, wherein the resource gateway obtains the access code of the refreshed first resource from the resource owner of the first resource according to the fourth request, including:所述资源网关根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求,其中,所述第五请求中包含所述第一资源的刷新码;The resource gateway generates a fifth request for requesting to refresh an access code of the first resource according to the refresh code of the first resource and the fifth API provided by the resource owner of the first resource, where The fifth request includes a refresh code of the first resource;所述资源网关将所述第五请求发送给所述资源拥有者; Sending, by the resource gateway, the fifth request to the resource owner;所述资源网关接收所述资源拥有者返回的刷新后的所述第一资源的访问码。The resource gateway receives the refreshed access code of the first resource returned by the resource owner.
- 如权利要求17所述的方法,其特征在于,在所述资源网关根据所述第一资源的刷新码、以及所述第一资源的资源拥有者提供的第五API,生成用于请求刷新所述第一资源的访问码的第五请求之前,所述方法还包括:The method according to claim 17, wherein the resource gateway generates a request for refreshing according to a refresh code of the first resource and a fifth API provided by a resource owner of the first resource. Before the fifth request for the access code of the first resource, the method further includes:所述资源网关将所述第一资源的刷新码的格式由所述第二预定格式转换为所述第二格式。 The resource gateway converts a format of a refresh code of the first resource from the second predetermined format to the second format.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310728568.0A CN103716317A (en) | 2013-12-25 | 2013-12-25 | Resource gateway and resource access authorization method |
CN201310728568.0 | 2013-12-25 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015096569A1 true WO2015096569A1 (en) | 2015-07-02 |
Family
ID=50408900
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/091649 WO2015096569A1 (en) | 2013-12-25 | 2014-11-19 | Resource gateway and resource access authorization method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103716317A (en) |
WO (1) | WO2015096569A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915555A (en) * | 2022-04-27 | 2022-08-16 | 广州河东科技有限公司 | Gateway driving communication method, device, equipment and storage medium |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103716317A (en) * | 2013-12-25 | 2014-04-09 | 华为技术有限公司 | Resource gateway and resource access authorization method |
CN110661817B (en) * | 2019-10-25 | 2022-08-26 | 新华三大数据技术有限公司 | Resource access method and device and service gateway |
CN111832055A (en) * | 2020-07-22 | 2020-10-27 | 政采云有限公司 | Authority verification system and method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102710640A (en) * | 2012-05-31 | 2012-10-03 | 中国联合网络通信集团有限公司 | Authorization requesting method, device and system |
CN103179099A (en) * | 2011-12-23 | 2013-06-26 | 北京新媒传信科技有限公司 | Unified certification method for accessing to open website platforms and website platform |
CN103716317A (en) * | 2013-12-25 | 2014-04-09 | 华为技术有限公司 | Resource gateway and resource access authorization method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103023933B (en) * | 2011-09-22 | 2015-09-16 | 北京尚良楷诚网络技术有限公司 | A kind of log-on message Integrated Processing System and method |
-
2013
- 2013-12-25 CN CN201310728568.0A patent/CN103716317A/en active Pending
-
2014
- 2014-11-19 WO PCT/CN2014/091649 patent/WO2015096569A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103179099A (en) * | 2011-12-23 | 2013-06-26 | 北京新媒传信科技有限公司 | Unified certification method for accessing to open website platforms and website platform |
CN102710640A (en) * | 2012-05-31 | 2012-10-03 | 中国联合网络通信集团有限公司 | Authorization requesting method, device and system |
CN103716317A (en) * | 2013-12-25 | 2014-04-09 | 华为技术有限公司 | Resource gateway and resource access authorization method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915555A (en) * | 2022-04-27 | 2022-08-16 | 广州河东科技有限公司 | Gateway driving communication method, device, equipment and storage medium |
CN114915555B (en) * | 2022-04-27 | 2024-03-12 | 广州河东科技有限公司 | Gateway drive communication method, device, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103716317A (en) | 2014-04-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI688253B (en) | Authorization method, method and device for requesting authorization | |
TWI679550B (en) | Account login method and device | |
EP3103238B1 (en) | Mobile cloud service architecture | |
JP6600156B2 (en) | A platform for building secure mobile collaborative applications that use dynamic presentation and data composition | |
TWI692990B (en) | Smart device binding method, device and system, communication system | |
WO2018068631A1 (en) | Account login method, apparatus, and server | |
WO2016074574A1 (en) | Method and device for interaction by scanning two-dimensional code | |
WO2016107466A1 (en) | Method and device for identifying user identity | |
US10162952B2 (en) | Security model for network information service | |
US9342667B2 (en) | Extended OAuth architecture | |
CN111047321A (en) | Service processing method and device, electronic equipment and storage medium | |
WO2015096569A1 (en) | Resource gateway and resource access authorization method | |
WO2017206747A1 (en) | Mobile payment method, device and system | |
EP3272093B1 (en) | Method and system for anti-phishing using smart images | |
JP2016533595A (en) | Client download and installation method and apparatus | |
AU2014357362A1 (en) | Multi-factor authentication system and method | |
CN110717171B (en) | Access token management for state preservation and reuse | |
EP2901660A1 (en) | Termininal interaction methods and related devices and systems | |
JP6929883B2 (en) | Data transmission methods, data transmitters, data receivers, and systems | |
CN111178840A (en) | Service processing method, device, system, electronic equipment and storage medium | |
US11206699B2 (en) | Registering network devices using known host devices | |
CN111598544A (en) | Method and apparatus for processing information | |
US20120101829A1 (en) | Wholesale device registration system, method, and program product | |
US20140090032A1 (en) | System and method for real time secure image based key generation using partial polygons assembled into a master composite image | |
WO2018121164A1 (en) | Method, device, and system for creating service numbers |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14875667 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14875667 Country of ref document: EP Kind code of ref document: A1 |