WO2013107403A1 - Oauth api的使用、调用方法、设备及系统 - Google Patents

Oauth api的使用、调用方法、设备及系统 Download PDF

Info

Publication number
WO2013107403A1
WO2013107403A1 PCT/CN2013/070753 CN2013070753W WO2013107403A1 WO 2013107403 A1 WO2013107403 A1 WO 2013107403A1 CN 2013070753 W CN2013070753 W CN 2013070753W WO 2013107403 A1 WO2013107403 A1 WO 2013107403A1
Authority
WO
WIPO (PCT)
Prior art keywords
oauth
interface
oauth api
client
api
Prior art date
Application number
PCT/CN2013/070753
Other languages
English (en)
French (fr)
Inventor
赵清伟
徐文华
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP17187516.4A priority Critical patent/EP3301881B1/en
Priority to EP13738680.1A priority patent/EP2806612B1/en
Publication of WO2013107403A1 publication Critical patent/WO2013107403A1/zh
Priority to US14/335,518 priority patent/US9430302B2/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/541Interprogram communication via adapters, e.g. between incompatible applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities

Definitions

  • the present invention relates to an authorized access technology, and in particular, to an OAUth API usage, calling method, device and system, and belongs to the field of communication technologies. Background technique
  • An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications has been widely used on the Internet as the most popular third-party API authentication and authorization access protocol in the industry.
  • the standard allows users to expose private information stored by a service provider to third-party applications without exposing the user's key. For example, Google, Sina, Tencent, etc. have released rich APIs based on the Oauth standard.
  • the trust mechanism of different services has been established through the Oauth protocol, which greatly promotes the opening of the Internet.
  • Oauth API Oauth Application Programming Interface
  • SDK Software Development Kit
  • Oauth API Provider Provider
  • Oauth authorization logic in the application code
  • a method for using an Oauth API comprising: receiving registration information of a registered Oauth API;
  • the Oauth API returns an information processing interface and a client client serial number management interface
  • Receiving a publish application message responding to the publishing the application message, generating the request including the client
  • an application development platform including:
  • An Oauth API registration module for receiving registration information for registering the Oauth API
  • association interface generation module configured to generate an Oauth API call association interface according to the registration information
  • a binding module configured to bind the OauthAPI call association interface and the registered Oauth API to generate binding information
  • an interface generation module configured to receive an OAUth API message, generate an Oauth API message corresponding to the registered Oauth API, generate an Oauth API interface corresponding to the registered Oauth API, and return an information processing interface and a client client serial number of the Oauth API.
  • a deployment module configured to receive a publishing application message, and generate a deployment package including the client request Oauth API interface, the Oauth API return information processing interface, and the client client serial number management interface, in response to the publishing application message;
  • a sending module configured to send the binding information and the deployment package to the application running engine, so that the application running engine completes OauthAPI scheduling according to the binding information and the deployment package.
  • an Oauth API calling method including: intercepting a client request message, assigning a client serial number to the client, and storing the client sequence number;
  • the receiving client sends an Oauth API call request carrying the client serial number by calling the client requesting the Oauth API interface;
  • an application running engine including:
  • a client client serial number management module configured to intercept a client request message, allocate a client serial number to the client, and store a client serial number
  • the Oauth API calls the request receiving module to receive the client request by calling the client.
  • An authentication module configured to authenticate the Oauth API call according to the client serial number carried by the Oauth API call request, and obtain an interface binding information corresponding to the Oauth API requested to be invoked after the authentication is passed;
  • An authorization authentication module configured to perform authorization authentication according to the interface binding information, and obtain an access token
  • An Oauth API calling module injecting the access token into the Oauth API call request, and sending an Oauth API call request injecting the access token to an Oauth provider to inject the Oauth API response into the access order
  • the card's Oauth API calls the request and returns the Oauth API return message
  • the Oauth API returns an information processing module that returns the Oauth API return information to the client to complete the Oauth API call.
  • a system using the Oauth API including an application development platform of an embodiment of the present invention, and an application execution engine of an embodiment of the present invention.
  • the use, calling method, device and system of the Oauth API provided by the present invention are The Oauth authentication logic abstracts to form a universal authentication interface, so that when the application is developed, the application development platform automatically generates an executable interface and injects it into the application running engine, so that the application running engine determines that the client needs Oauth.
  • the API When the API is called, the Oauth API call can be completed by automatically executing these executable interfaces. It can be seen that in the method of using the Oauth API in the above embodiment, only the developer needs to register the Oauth API to reference the application development platform, that is, provide the Oauth API registration information to the application development platform, and generate and process the remaining executable interfaces. Automated by the application development platform, greatly simplifying the application development process and improving development efficiency.
  • FIG. 2 is a schematic flowchart diagram of a method for using an Oauth API according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a method for using an Oauth API according to another embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram of an application development platform according to an embodiment of the present invention.
  • FIG. 5 is a schematic flowchart of a method for calling an Oauth API according to an embodiment of the present invention.
  • FIG. 6 is a schematic flowchart of a method for calling an Oauth API according to another embodiment of the present invention.
  • FIG. 7 is a schematic flowchart of a method for calling an Oauth API according to still another embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of an application running engine according to an embodiment of the present invention. detailed description
  • FIG. 1 is a system architecture diagram of a method for using the Oauth API for applying an embodiment of the present invention. As shown in Figure 1, it includes the Oauth API provider, client, application runtime engine, and application development platform.
  • the application development platform is used to automatically generate an executable interface related to OauthAPI. And injected into the application runtime engine, so that the application execution engine uses these executable interfaces to complete the client-initiated Oauth API call request.
  • the method of using the Oauth API of the embodiment of the present invention will be described in detail below from the perspective of an application development platform.
  • FIG. 2 is a schematic flowchart diagram of a method for using an Oauth API according to an embodiment of the present invention. As shown in Figure 2, the method of using the Oauth API includes the following steps:
  • Step S201 receiving registration information of the registered Oauth API
  • Step S202 Generate an Oauth API call association interface according to the registration information.
  • Step S203 binding the Oauth API call association interface and the registered Oauth API, and generating binding information
  • Step S204 receiving an OAUth API message, and in response to the adding an Oauth API message, generating a client request Oauth API interface corresponding to the registered Oauth API, an Oauth API return information processing interface, and a client client serial number management interface;
  • Step S205 Receive a publishing application message, and generate a deployment package including the client request Oauth API interface, the Oauth API return information processing interface, and the client client serial number management interface, in response to the publishing application message;
  • Step S206 Send the binding information and the deployment package to the application running engine, so that the application running engine completes Oauth API scheduling according to the binding information and the deployment package.
  • the developer registers the Oauth API in the application development platform, and provides registration information of the Oauth API, wherein the Oauth API is an available Oauth API provided by the Oauth API provider.
  • the application development platform automatically generates an Oauth API call association interface for implementing Oauth API calls based on the registration information of the registered Oauth API.
  • the Oauth API can be added to the app development platform based on the registered Oauth API trigger.
  • the Oauth authentication logic is abstracted to form a universal authentication interface, so that the developer automatically generates an executable interface and injects into the application when the application is developed.
  • the Oauth API call can be completed by automating these executable interfaces.
  • FIG. 3 is a schematic flow chart of a method for using an Oauth API according to another embodiment of the present invention. As shown in Figure 3, the following processes are included:
  • Step S301 the developer registers the Oauth domain in the application development platform
  • the information to be registered includes the following domain information required to access the Oauth API: Name (Name), which is used to identify the name of the registered Oauth domain, for example, sina;
  • Communication SSL Communication Use Protocol
  • HTTP Hypertext Transfer Protocol
  • HTTPS Secure Hyper Text Transfer Protocol
  • Authorization authentication URL which is used to identify the official authentication address provided by the Oauth API provider for user authorization.
  • Coupon port is "api.t.sina.com.cn/oauth/authorize";
  • An access token URL that identifies the address that the Oauth API provider provides to the client to obtain the access token and access signature.
  • the example is "api.t.sina.com.cn/oauth/access-token";
  • Application identifier (consumer key), which is used to identify the application serial number required to access the service, provided by the Oauth API provider, for example "4018652807";
  • the application secret (consumer secret), which is used to identify the application signature required to access the service, is provided by the Oauth API provider, for example, "5ee8fc57a5c8a9589a3933b92576a0b6,.
  • Step S302 after receiving the message of registering the Oauth domain, the application development platform records the registration information of the Oauth domain, and notifies the application running engine to save the registration information of the Oauth domain;
  • Step S303 the developer registers the Oauth API in the application development platform
  • the registration information that the developer needs to provide includes the API information required to invoke the Oauth API, which includes the following information:
  • Name used to identify the API name, for example, "SinaUpdate";
  • the HTTP method (method) is used to identify the method for calling the service.
  • the method for calling the service includes two methods: POST and GET. When registering, only one type is selected, for example, "POST";
  • URL used to identify the URL of the API access, for example "http://api.t.sina.com.cn/statuses/update.json";
  • Input (Input) format for identifying the input data format, for example urlencoded;
  • the output format is used to identify the API return data format.
  • the API return data format includes j son and xml. Select one of them, for example, "j son";
  • Step S304 After the application development platform receives the registration Oauth API message, the server Outh is generated.
  • the application development platform generates an interface that calls the OauthAPI in the application running engine according to the registration information of the Oauth API registered by the developer, and the OauthAPI calling interface of the server sends the request signature information and the access token to the Oauth after the authentication succeeds.
  • the API sends the interface for request processing.
  • the generation method is as follows: Register the name of the interface with the name of the registered Oauth API as the server Oauth API, with "111 ⁇ 1,,,,3 ⁇ 4 « 1116 0(1,,, "paramStr", "signature”, "accessToken” Generate an interface for the interface parameter name.
  • the generated server Oauth API call interface is for example:
  • Step S305 The application development platform generates an Oauth authorization authentication interface.
  • the application development platform When the application development platform receives the Oauth authorization authentication interface message, it automatically generates the interface required for Oauth authorization authentication.
  • There are two ways to generate an interface one is to generate an executable function interface, the other is to generate a docking interface with the SDK, and to support the binding of the dynamically generated authorization authentication interface and the OauthSDK interface deployed in the running engine.
  • the generated Oauth authorization authentication interface includes, for example:
  • the signature interface is generated by, for example, the registered OauthAPI name and the key word indicating "signature" as the interface name, and the "url"V'key'V'paras" as the parameter name to generate the signature interface.
  • the generated signature interface is for example:
  • GetSinaUpdateRequestToken(consumerkey, consumersecret, requestTokenURL, sig n) requesting the user to authorize the interface for example, by using the registered OauthAPI name and the keyword indicating "user authorization," as the interface name, and "requestToken,,," authoticationURL, Generate an interface for the parameter name.
  • the generated request user authorization interface is, for example:
  • SinaUpdateUserAuthirity ( requestToken,authoticationURL ) Get the Oauth access token interface, generated by, for example: the registered OauthAPI name and the keyword “get access token,” the interface name, and "requestToken", "AccessTokenURL", "Verifier” generates an interface for the parameter name.
  • the generated Oauth access token interface is, for example:
  • Step S306 the application development platform binds the authorization authentication interface by using the API name and defines the calling interface process.
  • the bound interface may be an executable function interface or a docking interface with the SDK.
  • the SDK interface is bound, the required authorization authentication interface for calling OauthAPI and the authorization authentication interface in OauthSDK are bound.
  • the calling interface process for example, according to the application development platform configuration information, it is determined that the application "automatically triggers Oauth authentication authorization" or "user triggers Oauth authentication authorization” process, and binds different authorization processes according to the configuration information.
  • the binding information includes: the name of the bound OauthAPI, the name of the interface that the server invokes OauthAPI, the name of the interface parameter, the name of the interface corresponding to the signature, the name of the interface and the name of the parameter, the name of the interface corresponding to the RequestToken and its parameter name, and the interface corresponding to the user authorization.
  • Name and its parameter name get the interface corresponding to the AccessToken and its parameter name, and the order in which the bound interface is executed.
  • the format of the binding interface is as follows: ⁇ API>
  • Step S307 The application development platform notifies the application running engine to inject the registration information and binding information of the registered Oauth API;
  • Step S308 the developer develops the business by using the Oauth API, triggers the application development platform to add the Oauth API;
  • Step S309 After receiving the OauthAPI message, the application development platform generates an Oauth authentication process interface.
  • the generated interface information includes: 1. The user triggers the authentication authorization entry (button/link). 2. The user triggers the authorization authentication process.
  • the backend server requests the interface of the Oauth authentication authorization, "OauthAPI Request Authorization Interface", where "OauthAPI Request Authorization Interface” includes the parameters 'OauthAPI Name” and "Customer Serial Number (ClientKey)".
  • Step S310 the application development platform generates "Customer" End OauthAPI request interface";
  • the generated client OauthAPI request interface is used by the client to request the application running engine to call the OauthAPL client OauthAPI request interface by calling the client OauthAPI request interface when the application is running, for example: the registered OauthAPI
  • the name and the keyword indicating "call" are the interface name, and the interface is generated with "apiName”, “clientKey”, “paras”, "inj ectedlnterfaceName” as the parameter names.
  • the generated client OauthAPI request interface is for example:
  • Step S311 the application development platform generates an "OauthAPI return information processing interface"; specifically, the generated OauthAPI return information processing interface is used to process the information returned by the OauthAPI after the application running engine calls OauthAPI successfully.
  • the OauthAPI return information processing interface is generated by, for example, the registered OauthAPI name and the keyword indicating "injection" as the interface name. Said, and generate interface definition information with "result" as the parameter name.
  • the generated OauthAPI return information processing interface is, for example:
  • Step S312 the application development platform generates a "client ClientKey management interface"
  • the generated client ClientKey management interface is used to save the ClientKey of the legal access identifier assigned by the application running engine to the client.
  • the client ClientKey management interface is generated by, for example, a function method that represents a "client key” keyword as an interface name and a keyword indicating "save client key", and the parameter name is "url”. Then, generate a parameterless function method with the name of the keyword "getClientKeyKey", and generate an interface.
  • the generated client ClientKey management interface is, for example:
  • Step S313 the developer issues an application
  • Step S314 the application development platform generates a deployment package and deploys.
  • the application development platform receives the message of the publishing application sent by the developer, generates a deployment package according to the application information, and notifies the application running engine to deploy.
  • FIG. 4 is a schematic structural diagram of an application development platform according to an embodiment of the present invention. As shown in Figure 4, the application development platform includes:
  • the Oauth API registration module 41 is configured to receive registration information of the registered Oauth API
  • the calling association interface generating module 42 is configured to generate an Oauth API call association interface according to the registration information
  • the binding module 43 is configured to bind the Oauth API call association interface and the registered Oauth API to generate binding information
  • the interface generating module 44 is configured to receive an add Oauth API message, generate a client request Oauth API interface corresponding to the registered Oauth API, generate an Oauth API return information processing interface, and a client client sequence in response to the adding an Oauth API message.
  • Number management interface The deployment module 45 is configured to receive a publishing application message, and generate a deployment package including the client request Oauth API interface, the Oauth API return information processing interface, and the client client serial number management interface, in response to the publishing application message. ;
  • the sending module 46 is configured to send the binding information and the deployment package to the application running engine, so that the application running engine completes Oauth API scheduling according to the binding information and the deployment package.
  • the interface generation module 44 includes, for example, a client request Oauth API interface generation unit, an Oauth API return information processing interface generation unit, and a client client serial number management interface generation unit.
  • the application development platform of the above embodiment uses the Oauth API for the application development process, which is the same as the method for using the Oauth API in the foregoing embodiment, and therefore will not be described again here.
  • a universal authentication interface is formed, so that when the developer develops the application, the application development platform automatically generates an executable interface and injects into the application running engine.
  • the application runtime engine determines that the client needs the Oauth API call
  • the Oauth API call can be completed by automatically executing these executable interfaces. It can be seen that in the method of using the Oauth API in the above embodiment, only the developer needs to register the Oauth API to reference the application development platform, that is, to provide the Oauth API registration information to the application development platform, and the generation and related processing of the remaining executable interfaces are performed. Automated by the application development platform, greatly simplifying the application development process and improving development efficiency.
  • the registration token includes: a name of the registered Oauth API, a request method, a uniform resource locator, an input format, an output format, and an open authorization protocol Oauth authentication.
  • the method further includes:
  • the Oauth domain registration module is configured to receive registration information of the registered Oauth domain, and the registered Oauth domain corresponds to the registered Oauth API.
  • the calling association interface generation module includes:
  • the server Oauth API calls an association interface generation unit for generating a server Oauth API call interface;
  • the Oauth authorized authentication interface generating unit is configured to generate an authorization authentication interface.
  • the binding information includes a name of the registered Oauth API, the server OauthAPI calling interface, the authorization authentication interface, and an interface execution flow.
  • the Oauth API calling method of the embodiment of the present invention may also be implemented based on the system architecture shown in FIG. 1, wherein the Oauth API calling method is executed by the application running engine shown in FIG. 1, and the present invention is from the perspective of the application running engine.
  • the Oauth API calling method of the embodiment is explained.
  • FIG. 5 is a schematic flowchart of a method for calling an Oauth API according to an embodiment of the present invention. As shown in Figure 5, the Oauth API calling method includes the following steps:
  • Step S501 intercepting a client request message, assigning a client serial number to the client, and storing the client serial number;
  • Step S502 The receiving client requests the Oauth API call that carries the client serial number by calling the client requesting the Oauth API interface.
  • Step S503 The Oauth API call is authenticated according to the client serial number carried by the Oauth API call request, and after the authentication is passed, the interface binding information corresponding to the Oauth API requested by the request is obtained;
  • Step S504 Perform authorization authentication according to the interface binding information to obtain an access token.
  • Step S505 Inject the access token into the Oauth API call request, and send an Oauth API call request injected into the access token.
  • Step S506 return the Oauth API return information to the client to complete the Oauth API call.
  • the interface binding information and all executable interfaces involved in the execution of the Oauth API call by the application running engine in response to the client request are pre-generated by the application development platform, and the specific generation process and the foregoing The method of using the Oauth API of the embodiment is the same, and therefore will not be described here.
  • the Oauth API call is completed by the application running engine automatically using the executable interface provided by the application development platform, and the convenient call of the Oauth API is realized.
  • the trigger package of the authorization authentication In two cases, the application automatically triggers Oauth authorization and the user triggers Oauth authorization. The following two cases are explained separately
  • FIG. 6 is a schematic flowchart of a method for calling an Oauth API according to another embodiment of the present invention.
  • the Oauth API calling method includes the following processes: Step S601: The user accesses an application deployed in the application running engine through the client tool, and initiates an application request.
  • Step S602 intercepting the application request sent by the client, and recording the first URL requested to be accessed; Step S603, assigning a uniquely identified client serial number (ClientKey) to the client, and recording the ClientKey; wherein the ClientKey value generation rule is: according to the client The terminal IP, the current session ID, the application name, the user ID, the GUID, and the current request time are generated by the HMAC-SHA1 algorithm signature generating step S604, and the user is redirected to the second with the ClientKey according to the URL recorded in step S602 and the ClientKey generated in step S603.
  • ClientKey client serial number
  • Step S605 the application calls the "ClientKey management interface” to obtain the ClientKey value and saves it when the client runs;
  • Step S606 the client requests the application
  • the running engine calls OauthAPI.
  • the request parameters include the ClientKey recorded in step S605, the OauthAPI name called, the parameters required to call OuathAPI, and the interface name that the client processes to return the result.
  • Step S607 The application running engine obtains the ClientKey and performs authentication to determine whether it is a legitimate ClientKey, and the method of the ⁇ iH ⁇ :
  • Step S608 Acquire and record the application URL, the parameter, the OauthAPI name, and the OauthAPI return information processing interface name of the request Oauth according to the request information;
  • Step S609 querying the interface binding information corresponding to the OauthAPI name of the request, the binding information of the interface is the binding information generated by the application development platform using the OauthAPI process;
  • Step S610 binding the interface obtained according to step S609 Information, obtain and execute the Oauth authorization authentication interface, and obtain the AccessToken;
  • obtaining an AccessToken specifically includes:
  • Step S611 Perform a HMAC-SHA1 algorithm signature on the ClientKey and the OauthAPI according to the previously recorded ClientKey, the OauthAPI name, and the obtained AcceessToken, and generate the signature value as the record of the AcceessToken record AccessToken.
  • Step S612 according to the previously recorded parameters, AccessToken, execute the "server OauthAPI call interface" to inject the AccessToken, and send the request to the OauthAPI;
  • Step S613 executing a "generating client script interface" to generate a dynamic script according to the obtained OauthAPI return information and the interface name of the injected injection result;
  • Step S614 completing the injection script to the client by pushing the generated script to the client.
  • Step S615 the client executes the injected script and calls "OauthAPI return information processing interface" to complete the return information processing, such as displaying and calculating the result information.
  • FIG. 7 is a schematic flowchart of a method for calling an Oauth API according to still another embodiment of the present invention.
  • the Oauth API call method includes the following process: Step S701, "Client OauthAPI Request Interface” opens the “Client Trigger Oauth Authentication Process Interface” after receiving the OauthAPI message.
  • the user triggers the authorization authentication process; after the user triggers the authentication and authorization process, the application execution engine is requested to perform the Oauth authorization; the "client request OauthAPI interface" receives the content of the OauthAPI message, including: OauthAPI name, the business page URL that is redirected after the authorization succeeds, and the call The corresponding parameter value of OauthAPI;
  • Step S702 After receiving the authorization request, the application running engine intercepts the request and records the URL, and requests the authorized OauthAPI name;
  • Step S703 the application running engine allocates a unique identifier ClientKey as the client legal identifier i and records the ClientKey;
  • Step S704 obtaining interface binding information according to the requested OauthAPI name
  • Step S705 Perform an authorization authentication interface according to the binding information, and obtain an AccessToken.
  • Step S706 recording an AccessToken according to the ClientKey and the OauthAPI name
  • Step S707 redirecting the user to a new URL generated by the combination of the recorded URL and the ClientKey, and the client acquires and records the ClientKey;
  • Step S708 the client requests the application running engine to call OauthAPI according to the ClientKey;
  • Step S709 acquires and records the ClientKey, the OauthAPI name, the request URL, the request parameter, and the callback interface name;
  • Step S710 if the authentication client key is legal and judges that authorization is performed, according to ClientKey and
  • the OauthAPI name obtains the Recorded AccessToken; if the authentication ClientKey is invalid, the ClientKey invalid information is returned, and if not authorized, the process returns to Step S702 to re-authorize; Step S711, injecting the acquired AccessToken into the request, and sending the request to the Oauth provider;
  • Step S712 callback the client interface, and return the information returned by the Oauth provider.
  • a one-to-one mode is formed, which avoids a multi-to-one mode in which the application client directly interacts with the Oauth provider, and reduces the interaction endpoint, thereby reducing The risk of sensitive data being transmitted over the Internet.
  • performing authorization authentication according to the interface binding information specifically includes:
  • the Oauth API authentication process interface is invoked in a general manner, and the use of the Oauth API provided by different Oauth providers to introduce a SDK of different providers wastes space.
  • FIG. 8 is a schematic structural diagram of an application running engine according to an embodiment of the present invention. As shown in Figure 7, the application run engine includes:
  • a client client serial number management module 81 configured to intercept a client request message, allocate a client serial number to the client, and store the client serial number;
  • the Oauth API call request receiving module 82 is configured to receive an Oauth API call request that is sent by the client by calling the client requesting the Oauth API interface and carrying the client serial number;
  • the authentication module 83 is configured to authenticate the Oauth API call according to the client serial number carried by the Oauth API call request, and obtain the interface binding information corresponding to the Oauth API requested to be invoked after the authentication is passed. ;
  • the authorization authentication module 84 is configured to perform authorization authentication according to the interface binding information to obtain an access token.
  • An Oauth API call module 85 injecting the access token into the Oauth API call request, and sending an Oauth API call request injected into the access token to an Oauth provider to inject the Oauth API response into the access
  • the token's Oauth API calls the request and returns the Oauth API Return information
  • the Oauth API returns to the information processing module 86, which returns the Oauth API return information to the client to complete the Oauth API call.
  • the Oauth API call is completed by automatically using the executable interface provided by the application development platform, and the convenient call of the Oauth API is realized.
  • the client request message includes a URL requested by the client to access.
  • the client request message includes an Oauth API identifier that is requested by the client, a business page URL that is redirected after the authorization succeeds, and a corresponding parameter value that invokes the OauthAPI.
  • the authorization authentication module specifically includes:
  • a first processing unit configured to acquire an authorization authentication interface according to the interface binding information, and execute the authorization authentication interface
  • the second processing unit when performing the triggering user authorization interface to redirect the Oauth provider authorization page, setting the Cauback of the Oauth provider to the URL of the application running engine to receive the authentication result service;
  • a third processing unit obtaining a verification token by receiving the authentication result service, and acquiring an access token
  • a fourth processing unit combining the client serial number and the Oauth API identifier as an identifier for recording the access token according to the stored client serial number, the Oauth API identifier, and the access token, And record the access token.
  • the embodiment of the present invention further provides a system using the Oauth API, including the application development platform of any of the foregoing embodiments and the application execution engine of any of the foregoing embodiments.
  • the system using the Oauth API abstracts the Oauth authentication logic to form a universal authentication interface, so that when the developer develops the application, the application development platform automatically generates an executable interface and injects into the application.
  • the Oauth API call can be completed by automating these executable interfaces. It can be seen that in the method of using the Oauth API of the above embodiment, only the developer is required
  • the Oauth API registration refers to the application development platform, which provides the Oauth API registration information to the application development platform. The generation and related processing of the remaining executable interfaces are automatically completed by the application development platform, which greatly simplifies the application development program and improves the development efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供Oauth API的使用、调用方法、设备及系统。该使用Oauth API 的方法包括:接收注册Oauth API的注册信息;根据注册信息生成Oauth API调用关联接口,并将其与注册的Oauth API绑定,生成绑定信息;接收增加Oauth API消息并响应,生成与所述注册的Oauth API对应的客户端请求Oauth API接口、Oauth API返回信息处理接口和客户端客户序列号管理接口;接收发布应用消息,响应所述发布应用消息,生成包括所述客户端请求Oauth API 接口、所述Oauth API返回信息处理接口和所述客户端客户序列号管理接口的部署包;将所述绑定信息和所述部署包发送至所述应用运行引擎,以使所述应用运行引擎根据所述绑定信息和所述部署包完成Oauth API调度。

Description

Oauth API的使用、 调用方法、 设备及系统 本申请要求 2012年 01月 20 日递交的申请号为 201210018877.4、 发 明名称为 "Oauth API的使用、 调用方法、 设备及系统" 的中国专利 申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及授权访问技术, 尤其涉及一种 Oauth API的使用、 调用方法、 设备及系统, 属于通信技术领域。 背景技术
一种开放授权协议 ( An open protocol to allow secure API authorization in a simple and standard method from desktop and web applications , Oauth )作为目 前业界最为流行的第三方 API鉴权授权访问协议已在互联网上广泛使用, 该 标准能够让用户在不暴露用户密钥的情况下将用户在某个服务提供商保存的 隐私信息暴露给第三方应用, 例如谷歌、 新浪、 腾讯等均基于 Oauth标准发 布了丰富的 API。 通过 Oauth协议建立了不同服务的信任机制, 极大的促进 了互联网的开放。
虽然目前服务提供商根据 Oauth协议提供 API已经可以达到了访问资源 的保护的目的, 但对于使用开放授权应用编程接口 ( Oauth Application Programming Interface, Oauth API )的开发者来讲, 只能通过编写代码的方式 使用 OauthAPL 例如通过引用 Oauth API提供商( Provider )提供的软件开发 工具包( Software Development Kit, SDK ) , 通过编写代码调用 SDK中的认 证接口和业务接口,紧耦合 Oauth 授权逻辑在应用代码,以此来完成集成 OauthAPI的工作。开发者以编写代码方式使用 OauthAPI ,这种使用 Oauth API 的方法复杂且低效, 从而暴露出了如何高效使用 OauthAPI的问题。 发明内容 针对现有技术中存在的缺陷, 本发明提供一种 Oauth API的使用、 调用 方法、 设备及系统, 以实现对 Oauth API的高效使用。
根据本发明的一方面, 提供一种使用 Oauth API的方法, 包括: 接收注册 Oauth API的注册信息;
根据所述注册信息生成 Oauth API调用关联接口;
绑定所述 Oauth API调用关联接口与注册的 Oauth API, 生成绑定信息; 接收增加 Oauth API消息 , 响应所述增加 Oauth API消息 , 生成与所述注 册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API返回信息处理 接口和客户端客户序列号管理接口;
接收发布应用消息, 响应所述发布应用消息, 生成包括所述客户端请求
Oauth API接口、 所述 OauthAPI返回信息处理接口和所述客户端客户序列号 管理接口的部署包;
将所述绑定信息和所述部署包发送至所述应用运行引擎, 以使所述应用 运行引擎根据所述绑定信息和所述部署包完成 Oauth API调度。
根据本发明的另一方面, 还提供一种应用开发平台, 包括:
Oauth API注册模块, 用于接收注册 Oauth API的注册信息;
调用关联接口生成模块, 用于根据所述注册信息生成 Oauth API调用关 联接口;
绑定模块, 用于绑定所述 OauthAPI调用关联接口与注册的 Oauth API, 生成绑定信息;
使用接口生成模块, 用于接收增加 Oauth API消息, 响应所述增加 Oauth API消息, 生成与所述注册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API返回信息处理接口和客户端客户序列号管理接口;
部署模块, 用于接收发布应用消息, 响应所述发布应用消息, 生成包括 所述客户端请求 Oauth API接口、所述 Oauth API返回信息处理接口和所述客 户端客户序列号管理接口的部署包;
发送模块,用于将所述绑定信息和所述部署包发送至所述应用运行引擎, 以使所述应用运行引擎根据所述绑定信息和所述部署包完成 OauthAPI调度。
根据本发明的又一方面, 还提供一种 Oauth API调用方法, 包括: 拦截客户端请求消息, 为所述客户端分配客户序列号, 并存储客户序列 号;
接收客户端通过调用客户端请求 Oauth API接口发送的携带有所述客户 序列号的 Oauth API调用请求;
根据所述 Oauth API调用请求所携带的客户序列号对所述 Oauth API调用 进行鉴权, 并在鉴权通过后, 获取与请求调用的 Oauth API对应的接口绑定 信息;
根据所述接口绑定信息进行授权认证, 获取访问令牌;
将所述访问令牌注入所述 Oauth API调用请求, 并将注入所述访问令牌 的 Oauth API调用请求发送至 Oauth提供商,以使所述 Oauth API响应注入所 述访问令牌的 Oauth API调用请求并返回 Oauth API返回信息;
将所述 Oauth API返回信息返回至客户端, 以完成 Oauth API调用。
根据本发明的再一方面, 还提供一种应用运行引擎, 包括:
客户端客户序列号管理模块, 用于拦截客户端请求消息, 为所述客户端 分配客户序列号, 并存储客户序列号;
Oauth API 调用请求接收模块, 用于接收客户端通过调用客户端请求
Oauth API接口发送的携带有所述客户序列号的 Oauth API调用请求;
鉴权模块, 用于根据所述 Oauth API调用请求所携带的客户序列号对所 述 Oauth API调用进行鉴权, 并在鉴权通过后, 获取与请求调用的 Oauth API 对应的接口绑定信息;
授权认证模块, 用于根据所述接口绑定信息进行授权认证, 获取访问令 牌;
Oauth API调用模块, 将所述访问令牌注入所述 Oauth API调用请求, 并 将注入所述访问令牌的 Oauth API调用请求发送至 Oauth提供商, 以使所述 Oauth API响应注入所述访问令牌的 Oauth API调用请求并返回 Oauth API返 回信息;
Oauth API返回信息处理模块,将所述 Oauth API返回信息返回至客户端, 以完成 Oauth API调用。
根据本发明的再一方面, 还提供一种使用 Oauth API的系统, 包括本发 明实施例的应用开发平台, 和本发明实施例的应用运行引擎。
根据本发明提供的 Oauth API的使用、 调用方法、 设备及系统, 通过对 Oauth认证逻辑进行抽象,形成一套可通用的认证接口,使开发者在开发应用 时, 由应用开发平台自动生成可执行的接口并注入到应用运行引擎, 以使应 用运行引擎判断客户端需要 Oauth API调用时, 可通过自动执行这些可执行 接口来完成 Oauth API调用。 可以看出, 在上述实施例的使用 Oauth API的方 法中, 仅需开发者将 Oauth API注册引用应用开发平台, 即向应用开发平台 提供 Oauth API注册信息, 其余可执行接口的生成及相关处理均由应用开发 平台自动完成, 极大地简化了应用开发程序, 提高了开发效率。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对实 施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面 描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 图 2为本发明实施例的使用 Oauth API的方法的流程示意图。
图 3为本发明另一实施例的使用 Oauth API的方法的流程示意图。 图 4为本发明实施例的应用开发平台的结构示意图。
图 5为本发明实施例的 Oauth API调用方法的流程示意图。
图 6为本发明另一实施例的 Oauth API调用方法的流程示意图。
图 7为本发明又一实施例的 Oauth API调用方法的流程示意图。
图 8为本发明实施例的应用运行引擎的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而 不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其他实施例 , 都属于本发明保护的范围。
图 1为用于应用本发明实施例的使用 Oauth API的方法的系统架构图。 如图 1所示, 包括 Oauth API提供商、 客户端、 应用运行引擎以及应用开发 平台。 其中, 应用开发平台用于自动生成与 OauthAPI相关的可执行的接口, 并注入到应用运行引擎中, 以使应用运行引擎利用这些可执行接口完成客户 端发起的 Oauth API调用请求。 下面从应用开发平台的角度对本发明实施例 的使用 Oauth API的方法进行详细说明。
图 2为本发明实施例的使用 Oauth API的方法的流程示意图。 如图 2所 示, 该使用 Oauth API的方法包括以下步骤:
步骤 S201 , 接收注册 Oauth API的注册信息;
步骤 S202, 根据所述注册信息生成 Oauth API调用关联接口;
步骤 S203 , 绑定所述 Oauth API调用关联接口与注册的 Oauth API, 生成 绑定信息;
步骤 S204, 接收增加 Oauth API消息, 响应所述增加 Oauth API消息, 生成与所述注册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API 返回信息处理接口和客户端客户序列号管理接口;
步骤 S205 , 接收发布应用消息, 响应所述发布应用消息, 生成包括所述 客户端请求 Oauth API接口、所述 Oauth API返回信息处理接口和所述客户端 客户序列号管理接口的部署包;
步骤 S206 , 将所述绑定信息和所述部署包发送至所述应用运行引擎, 以 使所述应用运行引擎根据所述绑定信息和所述部署包完成 Oauth API调度。
具体地, 在上述实施例的使用 Oauth API的方法中, 开发者在应用开发 平台中注册 Oauth API, 提供 Oauth API的注册信息, 其中, 该 Oauth API为 Oauth API提供商提供的可用 Oauth API。应用开发平台根据所注册 Oauth API 的注册信息自动生成用于实现支持 Oauth API调用的 Oauth API调用关联接 口。此外,还可根据注册的 Oauth API触发在应用开发平台中增加 Oauth API。
根据上述实施例的使用 Oauth API的方法,通过对 Oauth认证逻辑进行抽 象, 形成一套可通用的认证接口, 使开发者在开发应用时, 由应用开发平台 自动生成可执行的接口并注入到应用运行引擎, 以使应用运行引擎判断客户 端需要 Oauth API调用时, 可通过自动执行这些可执行接口来完成 Oauth API 调用。 可以看出, 在上述实施例的使用 Oauth API的方法中, 仅需开发者将 Oauth API注册引用应用开发平台, 即向应用开发平台提供 Oauth API注册信 息, 其余可执行接口的生成及相关处理均由应用开发平台自动完成, 极大地 简化了应用开发程序, 提高了开发效率。 图 3为本发明另一实施例的使用 Oauth API的方法的流程示意图。如图 3 所示, 包括以下流程:
步骤 S301 , 开发者在应用开发平台中注册 Oauth域;
其中, 需注册的信息包括以下在访问 Oauth API时需要的域信息: 名称( Name ), 其用于标识注册的 Oauth域的名称, 例如为 sina;
通信使用协议(Use SSL ),通信使用协议包括超文本传输协议(HyperText Transfer Protocol, HTTP )和安全超文本传输协议( Secure Hyper Text Transfer Protocol, HTTPS ) 两种, 注册时必须选择一种协议, 例如选择 HTTP;
请求令牌 ( Request Token )统一资源定位符 ( Uniform/Universal Resource Locator, URL ), 其用于标识 Oauth API提供商提供给客户用于获取请求令牌 的月良务地址 , 1 "列 ^口为 "api.t.sina.com.cn/oauth/request token";
授权认证 URL, 其用于标识 Oauth API提供商提供的用于用户授权的官 方认证地址 , 1 "列 ^口为 "api.t.sina.com.cn/oauth/authorize";
访问令牌 URL, 其用于标识 Oauth API提供商提供给客户用于获取访问 令牌和访问签名的地址 , 例 口为" api.t.sina.com.cn/oauth/access— token";
应用序列号 (consumer Key ), 其用于标识访问服务需要的应用序列号, 由 Oauth API提供商提供, 例如为 "4018652807";
应用签名 (consumer Secret ), 其用于标识访问服务需要的应用签名, 由 Oauth API提供商提供, 例如为 "5ee8fc57a5c8a9589a3933b92576a0b6,,。
步骤 S302 , 应用开发平台接收到注册 Oauth域的消息后, 记录 Oauth域 的注册信息, 并通知应用运行引擎保存 Oauth域的注册信息;
步骤 S303 , 开发者在应用开发平台中注册 Oauth API;
其中, 开发者需提供的注册信息包括调用 Oauth API所需要的 API信息, 其具体包括如下信息:
名称( Name ), 用于标识 API名称, 例如为 "SinaUpdate";
HTTP方法(method ), 用于标识调用服务的方法, 调用服务的方法包括 POST和 GET两种方法, 注册时只需选择一种, 例如为 "POST";
URL , 用 于 标 识 API 访 问 的 URL , 例 如 为 "http://api.t.sina.com.cn/statuses/update.json";
输入(Input )格式, 用于标识输入数据格式, 例如为 urlencoded; 输出 (Output )格式,用于标识 API返回数据格式, API返回数据格式包 括 j son和 xml两种, 选择其一, 例如为" j son";
是否需要认证标识(Need Oauth ), 选择 YES或 NO, 例如为 "YES"; 域( Domain ), 用于关联一个已注册的 Oauth域, 例如为 "sina"。
步骤 S304 ,应用开发平台收到注册 Oauth API消息后,生成服务端 Oauth
API调用接口;
具体地, 应用开发平台根据开发者注册的 Oauth API的注册信息, 生成 在应用运行引擎调用 OauthAPI的接口, 该服务端 OauthAPI调用接口是在认 证成功后注入了请求签名信息和访问令牌后向 Oauth API发送请求处理的接 口。 生成方式例如为: 以注册 Oauth API的名称为服务端 Oauth API调用接口 的名称, 以"111~1,,,,¾« 1116 0(1,,, "paramStr", "signature", "accessToken"为接 口参数名称生成接口。 生成的服务端 Oauth API调用接口例如为:
function InvokeSinaUpdate(url,method, paramStr,signature,accessToken) {
WebRMI.sendRealRESTRequest(''http://api.t.sina.com.cn/statuses/update.jso n", "POST", "id=test01", "setlnfo");
}
步骤 S305 , 应用开发平台生成 Oauth授权认证接口;
应用开发平台收到生成 Oauth授权认证接口消息时, 自动生成 Oauth授 权认证所需要的接口。 生成接口有两种方式, 一种生成可执行的功能接口, 一种生成与 SDK对接接口,支持绑定动态生成的授权认证接口和部署在运行 引擎中的 OauthSDK的接口。
所生成的 Oauth授权认证接口例如包括:
签名接口, 生成方式例如为: 以注册的 OauthAPI名称和表示"签名"的关 键词为接口名称, 并以" url'V'key'V'paras"为参数名称生成签名接口。 所生成 的签名接口例如为:
function SinaUpdateSign(baseURI,KEY)
{ return binb2str(core_shal (str2binb(baseURI), baseURI. length * KEY));} 获取请求令牌接口, 生成方式例如为: 以注册的 OauthAPI名称和表示 "RequestToken" 的 关 键 词 为 接 口 名 称 , 并 以 "consumerkey'V'consumersecret'V'requestTokenURL", "signature"为参数名称生 成接口。 所生成的获取请求令牌接口例如为:
Function
GetSinaUpdateRequestToken(consumerkey,consumersecret,requestTokenURL,sig n) 请求用户授权接口,生成方式例如为:以注册的 OauthAPI名称和表示"用 户授权,,的关键词为接口名称, 并以 "requestToken,,,"authoticationURL,,为参数 名称生成接口。 所生成的请求用户授权接口例如为:
function SinaUpdateUserAuthirity ( requestToken,authoticationURL ) 获取 Oauth访问令牌接口, 生成方式例如为: 以注册的 OauthAPI名称和 表 示 " 获 取 访 问 令 牌 ,, 的 关 键 词 为 接 口 名 称 , 并 以 "requestToken","AccessTokenURL", "Verifier"为参数名称生成接口。所生成的 获取 Oauth访问令牌接口例如为:
function
步骤 S306,应用开发平台通过 API名称绑定授权认证接口并定义调用接 口流程。
具体地, 绑定的接口可以是可执行的功能接口也可以是与 SDK对接接 口。当绑定 SDK接口时,对调用 OauthAPI的所需的授权认证接口和 OauthSDK 中授权认证接口进行绑定映射。 定义调用接口流程时, 例如根据应用开发平 台配置信息判断是绑定 "应用自动触发 Oauth认证授权"或"用户触发 Oauth 认证授权"流程, 按照配置信息绑定不同的授权流程。
绑定信息包括: 绑定的 OauthAPI名称、 服务端调用 OauthAPI的接口名 称及接口参数名称、 签名对应的接口名称及其参数名称、 获取 RequestToken 对应的接口名称及其参数名称、触发用户授权对应的接口名称及其参数名称、 获取 AccessToken对应的接口及其参数名称及绑定的接口执行顺序。
绑定接口的格式例如为: <API>
<name>ApiName</ name>
<interfaces>
<invokeInfterFace> <! [CDATA[InvokeAPIName {...} ]]//绑定为 OauthSDK 接口时对应为
OauthSDK中的具体接口
<invokeInfterFace />
<OauthProccess>
<type> <![auto ]]
</type>
<Signature>
<! [CDATA[ApiNameSign {...} ]]// 绑定为 OauthSDK 接口时对应为 OauthSDK中的具体接口 </Signature>
<RequestToken>
<! [CDATA[GetApiNameRequestToken {...} ]] //绑定为 OauthSDK接口时 对应为 OauthSDK中的具体接口
</ RequestToken > <UserAuthirity>
<! [CDATA[ApiNameUser Authority {...} ]] //绑定为 OauthSDK接口时对应 为 OauthSDK中的具体接口
</UserAuthirity>
<AccessToken> <! [CDATA[GetApiNameAccessToken {...} ]]〃绑定为 OauthSDK接口时对 应为 OauthSDK中的具体接口
</ AccessToken >
</OauthProccess> </interfaces> </API>
步骤 S307 , 应用开发平台通知应用运行引擎注入注册的 Oauth API的注 册信息及绑定信息;
步骤 S308 , 开发者使用 Oauth API 开发业务, 触发应用开发平台增加 Oauth API;
步骤 S309, 应用开发平台接收到增加 OauthAPI消息后, 生成触发 Oauth 认证流程界面。
具体地,应用开发平台若根据配置信息判断 Oauth授权认证流程为"用户 触发授权认证流程 ", 则生成的界面信息包括: 1、用户触发认证授权入口(按 钮 /链接 ) 2、用户触发授权认证流程后向服务端请求 Oauth认证授权的接口, "OauthAPI请求授权接口",其中 "OauthAPI请求授权接口 "包括参数' OauthAPI 名称"和"客户序列号 ( ClientKey ) "。 步骤 S310, 应用开发平台生成 "客户端 OauthAPI请求接口";
具体地, 所生成的客户端 OauthAPI请求接口用于在应用运行时,客户端 通过调用该客户端 OauthAPI请求接口来请求应用运行引擎调用 OauthAPL 客户端 OauthAPI请求接口的生成方式例如为: 以注册的 OauthAPI名称和表 示 "调用" 的关键词为接口名称, 并以 "apiName" , "clientKey" , "paras" , " inj ectedlnterfaceName " 为参数名称生成接口。 所生成的客户端 OauthAPI 请求接口例如为:
function invokeSinaUpdate(apiName,clientKey,paras,callback)
{ . . . }
步骤 S311 , 应用开发平台生成 "OauthAPI返回信息处理接口"; 具体地,所生成的 OauthAPI返回信息处理接口用于处理应用运行引擎调 用 OauthAPI成功后, OauthAPI返回的信息。 OauthAPI返回信息处理接口的 生成方式例如为: 以注册的 OauthAPI名称和表示 "注入" 的关键词为接口名 称, 并以 "result" 为参数名称生成接口定义信息。 所生成的 OauthAPI返回 信息处理接口例如为:
function sinaUpdateInjected(result){ ... }
步骤 S312, 应用开发平台生成 "客户端 ClientKey管理接口";
具体地,所生成的客户端 ClientKey管理接口用于保存应用运行引擎分配 给客户端的合法访问标识的 ClientKey。 客户端 ClientKey管理接口的生成方 式例如为: 以表示 "客户端 key" 关键词为接口名称, 以表示 "保存客户端 key" 的关键词为名生成一个功能方法, 且其参数名称为 "url" , 再以表示 "getClientKeyKey" 的关键词为名生成一个无参数的功能方法, 生成接口。 所生成的客户端 ClientKey管理接口例如为:
function ClientKey
saveClientKey(url) { ... } ; getClientKeyKey(){… };
}
步骤 S313 , 开发者发布应用;
步骤 S314, 应用开发平台生成部署包并部署。
具体地, 应用开发平台接收到开发者发送的发布应用的消息后根据应用 信息生成部署包并通知应用运行引擎进行部署。
图 4为本发明实施例的应用开发平台的结构示意图。 如图 4所示, 该应 用开发平台包括:
Oauth API注册模块 41 , 用于接收注册 Oauth API的注册信息;
调用关联接口生成模块 42, 用于根据所述注册信息生成 Oauth API调用 关联接口;
绑定模块 43 ,用于绑定所述 Oauth API调用关联接口与注册的 Oauth API, 生成绑定信息;
使用接口生成模块 44 ,用于接收增加 Oauth API消息,响应所述增加 Oauth API消息, 生成与所述注册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API返回信息处理接口和客户端客户序列号管理接口; 部署模块 45 , 用于接收发布应用消息, 响应所述发布应用消息, 生成包 括所述客户端请求 Oauth API接口、所述 Oauth API返回信息处理接口和所述 客户端客户序列号管理接口的部署包;
发送模块 46, 用于将所述绑定信息和所述部署包发送至所述应用运行引 擎, 以使所述应用运行引擎根据所述绑定信息和所述部署包完成 Oauth API 调度。
其中, 使用接口生成模块 44例如包括客户端请求 Oauth API接口生成单 元、 Oauth API返回信息处理接口生成单元和客户端客户序列号管理接口生成 单元。
上述实施例的应用开发平台使用 Oauth API进行应用开发的流程与前述 实施例的使用 Oauth API的方法相同, 故此处不再赘述。
根据上述实施例的应用开发平台, 通过对 Oauth认证逻辑进行抽象, 形 成一套可通用的认证接口, 使开发者在开发应用时, 由应用开发平台自动生 成可执行的接口并注入到应用运行引擎, 以使应用运行引擎判断客户端需要 Oauth API调用时, 可通过自动执行这些可执行接口来完成 Oauth API调用。 可以看出,在上述实施例的使用 Oauth API的方法中,仅需开发者将 Oauth API 注册引用应用开发平台, 即向应用开发平台提供 Oauth API注册信息, 其余 可执行接口的生成及相关处理均由应用开发平台自动完成, 极大地简化了应 用开发程序, 提高了开发效率。
进一步地, 在上述实施例的应用开发平台中, 所述注册令牌包括: 所述 注册的 Oauth API的名称、 请求方法、 统一资源定位符、 输入格式、 输出格 式、是否需要开放授权协议 Oauth认证标识以及所述注册的 Oauth API对应的 Oauth域的域名。
进一步地, 在上述实施例的应用开发平台中, 还包括:
Oauth域注册模块,用于接收注册 Oauth域的注册信息,所述注册的 Oauth 域与所述注册的 Oauth API相对应。
进一步地, 在上述实施例的应用开发平台中, 调用关联接口生成模块包 括:
服务端 Oauth API调用关联接口生成单元,用于生成服务端 Oauth API调 用接口; Oauth授权认证接口生成单元, 用于生成授权认证接口。
进一步地, 在上述实施例的应用开发平台中, 绑定信息包括所述注册的 Oauth API的名称、 所述服务端 OauthAPI调用接口、 所述授权认证接口, 以 及接口执行流程。
本发明实施例的 Oauth API调用方法也可基于图 1所示的系统架构来实 现, 其中该 Oauth API调用方法由图 1中所示的应用运行引擎来执行, 下面 从应用运行引擎的角度对本发明实施例的 Oauth API调用方法进行说明。
图 5为本发明实施例的 Oauth API调用方法的流程示意图。 如图 5所示, 该 Oauth API调用方法包括以下步骤:
步骤 S501 , 拦截客户端请求消息, 为所述客户端分配客户序列号, 并存 储客户序列号;
步骤 S502, 接收客户端通过调用客户端请求 Oauth API接口发送的携带 有所述客户序列号的 Oauth API调用请求;
步骤 S503 , 根据所述 Oauth API调用请求所携带的客户序列号对所述 Oauth API调用进行鉴权, 并在鉴权通过后, 获取与请求调用的 Oauth API对 应的接口绑定信息;
步骤 S504, 根据所述接口绑定信息进行授权认证, 获取访问令牌; 步骤 S505 , 将所述访问令牌注入所述 Oauth API调用请求, 并将注入所 述访问令牌的 Oauth API调用请求发送至 Oauth提供商, 以使所述 Oauth API 响应注入所述访问令牌的 OauthAPI调用请求并返回 Oauth API返回信息; 步骤 S506, 将所述 Oauth API返回信息返回至客户端, 以完成 Oauth API 调用。
在上述实施例的 Oauth API调用方法中, 应用运行引擎响应客户端请求 执行 Oauth API调用过程中所需涉及的接口绑定信息及全部可执行接口均由 应用开发平台预先生成, 具体生成过程与前述实施例的使用 Oauth API的方 法相同, 故此处不再赘述。
根据上述实施例的 Oauth API调用方法, 通过由应用运行引擎自动使用 应用开发平台提供的可执行接口来完成 Oauth API调用,实现了 Oauth API的 便捷调用。
进一步地, 在上述实施例的 Oauth API调用方法中, 授权认证的触发包 括两种情形, 即应用自动触发 Oauth授权认证和用户触发 Oauth授权认证。 下面分别对这两种情形进行说明
图 6为本发明另一实施例的 Oauth API调用方法的流程示意图。 如图 6 所示,由应用自动触发 Oauth授权认证时, Oauth API调用方法包括以下流程: 步骤 S601 , 用户通过客户端工具访问部署在应用运行引擎的应用, 发起 应用请求;
步骤 S602 , 拦截客户端发送的应用请求, 记录请求访问的第一 URL; 步骤 S603 , 为客户端分配唯一标识的客户序列号 (ClientKey ), 并记录 ClientKey; 其中, ClientKey值生成规则为: 根据客户端 IP、 当前 SessionID、 应用 名称、 用户 ID、 GUID以及当前请求时间, 通过 HMAC-SHA1算法签名生成 步骤 S604 ,根据步骤 S602记录的 URL和步骤 S603生成的 ClientKey重 定向用户到带有 ClientKey的第二 URL; 其中, 第二 URL格式示例如下: http://hostname/appname?ClientKey=ssdfd44541232322sdd 步骤 S605 ,应用在客户端运行时调用 "ClientKey管理接口 "获取 ClientKey 值并保存; 步骤 S606 ,客户端请求应用运行引擎调用 OauthAPI,请求参数包括在步 骤 S605记录的 ClientKey, 调用的 OauthAPI名称、 调用 OuathAPI需要的参 数及客户端处理返回结果的接口名称。 步骤 S607 , 应用运行引擎获取 ClientKey并进行认证, 以判断是否是合 法 ClientKey , ΐ人 ΐ正方法 iH ^口^口下:
1 )检查在应用运行引擎是否记录了客户端提供的 ClientKey, 不存在则 非法。 2 ) ClientKey进行反签名获取 CientKey中对应的每一项信息
3 )根据客户端请求获取客户端 IP、 当前 SessionID、 请求应用名称、 用 户 ID
4 )根据 2 ) 所获取信息和 3 )所获取的信息进行每项匹配, 如果匹配则 认为合法, 否则非法。
步骤 S608, 根据请求信息获取并记录请求 Oauth的应用 URL、 参数、 OauthAPI名称、 OauthAPI返回信息处理接口名称;
步骤 S609, 根据请求的 OauthAPI名称, 查询与之对应的接口绑定信息, 该接口绑定信息即为应用开发平台使用 OauthAPI流程中生成的绑定信息; 步骤 S610, 根据步骤 S609获取的接口绑定信息, 获取并执行 Oauth授 权认证接口 , 获取 AccessToken;
具体地, 获取 AccessToken具体包括:
1 )根据所述接口绑定信息获取授权认证接口,并执行所述授权认证接口; 2 )执行触发用户授权接口重定向 Oauth提供商授权页面时, 设置 Oauth 提供商的 CALLBACK为应用运行引擎接收认证结果服务的 URL;
3 )通过接收所述认证结果服务获取验证符, 并获取访问令牌;
4 )根据所存储的客户序列号、 所述 Oauth API标识和所述访问令牌, 将 所述客户序列号和所述 Oauth API标识进行组合以作为记录所述访问令牌的 标识, 并记录所述访问令牌。
步骤 S611 , 根据在先记录的 ClientKey、 OauthAPI 名称, 以及获取的 AcceessToken, 对 ClientKey和 OauthAPI重新进行 HMAC-SHA1算法签名, 生成的签名值作为记录 AcceessToken的标识记录 AccessToken。
步骤 S612,根据在先记录的参数、 AccessToken,执行 "服务端 OauthAPI 调用接口" 注入 AccessToken, 并发送请求给 OauthAPI;
步骤 S613 , 根据获取的 OauthAPI返回信息、 记录的注入结果的接口名 称, 执行 "生成客户端脚本接口" 生成动态脚本;
生成动态 p本示例如下:
Figure imgf000017_0001
out=interfaceCallBack+ "(,, +data " ) 步骤 S614, 通过推送生成的脚本到客户端完成注入脚本到客户端。
步骤 S615,客户端执行注入的脚本并调用 "OauthAPI返回信息处理接口" 完成返回信息处理, 例如显示和计算结果信息。
图 7为本发明又一实施例的 Oauth API调用方法的流程示意图。 如图 7 所示, 由用户触发 Oauth授权认证时, Oauth API调用方法包括以下流程: 步骤 S701 , "客户端 OauthAPI请求接口" 收到调用 OauthAPI消息后打 开 "客户端触发 Oauth认证流程界面", 提示用户触发授权认证流程; 用户触 发认证授权流程后, 请求应用运行引擎进行 Oauth 授权; "客户端请求 OauthAPI接口 " 收到调用 OauthAPI消息的内容包括: OauthAPI名称、 授权 成功后转向的业务页面 URL、 调用 OauthAPI时对应的参数值;
步骤 S702, 应用运行引擎收到授权请求后, 拦截请求并记录 URL、 请求 授权的 OauthAPI名称;
步骤 S703 , 应用运行引擎分配一个唯一标识 ClientKey作为客户端合法 标 i只并己录 ClientKey;
步骤 S704, 根据请求的 OauthAPI名称获取其接口绑定信息;
步骤 S705, 根据绑定信息执行授权认证接口, 获取 AccessToken;
步骤 S706, 根据 ClientKey和 OauthAPI名称记录 AccessToken;
步骤 S707 , 重定向用户到由记录的 URL和 ClientKey组合生成的新的 URL, 客户端获取并记录 ClientKey;
新的 URL例如为: http:〃 huawei.com?ClientKey=ssd§ 123232323。 步骤 S708, 客户端根据 ClientKey请求应用运行引擎调用 OauthAPI; 步骤 S709, 获取并记录 ClientKey, OauthAPI名称、 请求 URL、 请求参 数、 回调接口名称;
步骤 S710, 若认证 ClientKey合法, 并判断已授权, 则根据 ClientKey和
OauthAPI 名称获取记录的 AccessToken; 若认证 ClientKey 非法则返回 ClientKey无效信息, 如果未授权则回到步骤 S702重新进行授权; 步骤 S711 , 注入获取的 AccessToken到请求中, 发送请求到 Oauth提供 商;
步骤 S712, 回调客户端接口, 返回 Oauth提供商返回信息。
在上述实施例的 Oauth API调用方法中, 通过以集中方式在服务器端执 行授权认证, 形成一对一模式, 避免应用客户端与 Oauth提供商直接交互的 多对一模式, 减少交互端点, 能够降低敏感数据在互联网上传输的风险。
进一步地, 在上述实施例的 Oauth API调用方法中, 根据所述接口绑定 信息进行授权认证具体包括:
从所述接口绑定信息中获取授权认证接口, 并运行所述授权认证接口完 成授权认证; 或
从所述接口绑定信息中获取与 Oauth SDK中接口对应的接口映射信息, 成认证授权。
根据上述实施例的 Oauth API调用方法,釆用通用的方式调用执行 Oauth API认证流程接口,避免使用不同 Oauth提供商提供的 Oauth API而引入不同 提供商的 SDK浪费空间。
图 8为本发明实施例的应用运行引擎的结构示意图。 如图 7所示, 该应 用运行引擎包括:
客户端客户序列号管理模块 81 , 用于拦截客户端请求消息, 为所述客户 端分配客户序列号, 并存储客户序列号;
Oauth API调用请求接收模块 82, 用于接收客户端通过调用客户端请求 Oauth API接口发送的携带有所述客户序列号的 Oauth API调用请求;
鉴权模块 83 , 用于根据所述 Oauth API调用请求所携带的客户序列号对 所述 Oauth API调用进行鉴权,并在鉴权通过后,获取与请求调用的 Oauth API 对应的接口绑定信息;
授权认证模块 84, 用于根据所述接口绑定信息进行授权认证, 获取访问 令牌;
Oauth API调用模块 85, 将所述访问令牌注入所述 Oauth API调用请求, 并将注入所述访问令牌的 Oauth API调用请求发送至 Oauth提供商,以使所述 Oauth API响应注入所述访问令牌的 Oauth API调用请求并返回 Oauth API返 回信息;
Oauth API返回信息处理模块 86,将所述 Oauth API返回信息返回至客户 端, 以完成 Oauth API调用。
上述实施例的应用运行引擎执行 Oauth API调用的具体流程与上述实施 例的 Oauth API调用方法相同, 故此处不再赘述。
根据上述实施例的应用运行引擎, 通过自动使用应用开发平台提供的可 执行接口来完成 Oauth API调用, 实现了 Oauth API的便捷调用。
进一步地, 在上述实施例的应用运行引擎中, 所述客户端请求消息包括 所述客户端请求访问的 URL。
进一步地, 在上述实施例的应用运行引擎中, 所述客户端请求消息包括 客户端请求调用的 Oauth API标识、 授权成功后转向的业务页面 URL, 以及 调用 OauthAPI的相应参数值。
进一步地, 在上述实施例的应用运行引擎中, 所述授权认证模块具体包 括:
第一处理单元, 用于根据所述接口绑定信息获取授权认证接口, 并执行 所述授权认证接口;
第二处理单元,执行触发用户授权接口重定向 Oauth提供商授权页面时, 设置 Oauth提供商的 CALLBACK为应用运行引擎接收认证结果服务的 URL;
第三处理单元, 通过接收所述认证结果服务获取验证符, 并获取访问令 牌;
第四处理单元, 根据所存储的客户序列号、 所述 Oauth API标识和所述 访问令牌, 将所述客户序列号和所述 Oauth API标识进行组合以作为记录所 述访问令牌的标识, 并记录所述访问令牌。
本发明实施例还提供一种使用 Oauth API的系统, 包括上述任一实施例 的应用开发平台和上述任一实施例的应用运行引擎。
根据上述实施例的使用 Oauth API的系统,通过对 Oauth认证逻辑进行抽 象, 形成一套可通用的认证接口, 使开发者在开发应用时, 由应用开发平台 自动生成可执行的接口并注入到应用运行引擎, 以使应用运行引擎判断客户 端需要 Oauth API调用时, 可通过自动执行这些可执行接口来完成 Oauth API 调用。 可以看出, 在上述实施例的使用 Oauth API的方法中, 仅需开发者将 Oauth API注册引用应用开发平台, 即向应用开发平台提供 Oauth API注册信 息, 其余可执行接口的生成及相关处理均由应用开发平台自动完成, 极大地 简化了应用开发程序, 提高了开发效率。
最后应说明的是: 以上实施例仅用以说明本发明的技术方案, 而非对其 限制; 尽管参照前述实施例对本发明进行了详细的说明, 本领域的普通技术 人员应当理解: 其依然可以对前述各实施例所记载的技术方案进行修改, 或 者对其中部分技术特征进行等同替换; 而这些修改或者替换, 并不使相应技 术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims

1、 一种使用开放授权应用编程接口 Oauth API的方法, 其特征在于, 包 括:
接收注册 Oauth API的注册信息;
根据所述注册信息生成 Oauth API调用关联接口;
绑定所述 Oauth API调用关联接口与注册的 Oauth API, 生成绑定信息; 接收增加 Oauth API消息 , 响应所述增加 Oauth API消息 , 生成与所述注 册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API返回信息处理 接口和客户端客户序列号管理接口;
接收发布应用消息, 响应所述发布应用消息, 生成包括所述客户端请求
Oauth API接口、 所述 OauthAPI返回信息处理接口和所述客户端客户序列号 管理接口的部署包;
将所述绑定信息和所述部署包发送至所述应用运行引擎, 以使所述应用 运行引擎根据所述绑定信息和所述部署包完成 Oauth API调度。
2、 根据权利要求 1所述的使用 OauthAPI的方法, 其特征在于, 所述注 册令牌包括: 所述注册的 Oauth API的名称、 请求方法、 统一资源定位符、 输入格式、 输出格式、 是否需要开放授权协议 Oauth认证标识以及所述注册 的 Oauth API对应的 Oauth域的域名。
3、 根据权利要求 1所述的使用 OauthAPI的方法, 其特征在于, 接收注 册 Oauth API的注册信息之前还包括:
接收注册 Oauth域的注册信息,所述注册的 Oauth域与所述注册的 Oauth API相对应。
4、 根据权利要求 1 所述的使用 Oauth API的方法, 其特征在于, 所述 Oauth API调用关联接口包括服务端 Oauth API调用接口和授权认证接口。
5、 根据权利要求 4所述的使用 OauthAPI的方法, 其特征在于, 所述绑 定信息包括所述注册的 Oauth API的名称、 所述服务端 Oauth API调用接口、 所述授权认证接口, 以及接口执行流程。
6、 一种应用开发平台, 其特征在于, 包括:
Oauth API注册模块, 用于接收注册 Oauth API的注册信息;
调用关联接口生成模块, 用于根据所述注册信息生成 Oauth API调用关
1 联接口;
绑定模块, 用于绑定所述 OauthAPI调用关联接口与注册的 Oauth API, 生成绑定信息;
使用接口生成模块, 用于接收增加 Oauth API消息, 响应所述增加 Oauth API消息, 生成与所述注册的 Oauth API对应的客户端请求 Oauth API接口、 Oauth API返回信息处理接口和客户端客户序列号管理接口;
部署模块, 用于接收发布应用消息, 响应所述发布应用消息, 生成包括 所述客户端请求 Oauth API接口、所述 Oauth API返回信息处理接口和所述客 户端客户序列号管理接口的部署包;
发送模块,用于将所述绑定信息和所述部署包发送至所述应用运行引擎, 以使所述应用运行引擎根据所述绑定信息和所述部署包完成 OauthAPI调度。
7、 根据权利要求 6所述的应用开发平台, 其特征在于, 所述注册令牌包 括: 所述注册的 OauthAPI的名称、 请求方法、 统一资源定位符、 输入格式、 输出格式、是否需要开放授权协议 Oauth认证标识以及所述注册的 Oauth API 对应的 Oauth域的域名。
8、 根据权利要求 6所述的应用开发平台, 其特征在于, 还包括:
Oauth域注册模块,用于接收注册 Oauth域的注册信息,所述注册的 Oauth 域与所述注册的 Oauth API相对应。
9、 根据权利要求 6所述的应用开发平台, 其特征在于, 所述调用关联接 口生成模块包括:
服务端 Oauth API调用关联接口生成单元,用于生成服务端 Oauth API调 用接口;
Oauth授权认证接口生成单元, 用于生成授权认证接口。
10、 根据权利要求 9所述的应用开发平台, 其特征在于, 所述绑定信息 包括所述注册的 Oauth API的名称、 所述服务端 Oauth API调用接口、 所述授 权认证接口, 以及接口执行流程。
11、 一种 Oauth API调用方法, 其特征在于, 包括:
拦截客户端请求消息, 为所述客户端分配客户序列号, 并存储客户序列 号;
接收客户端通过调用客户端请求 Oauth API接口发送的携带有所述客户
2 序列号的 Oauth API调用请求;
根据所述 Oauth API调用请求所携带的客户序列号对所述 Oauth API调用 进行鉴权, 并在鉴权通过后, 获取与请求调用的 Oauth API对应的接口绑定 信息;
根据所述接口绑定信息进行授权认证, 获取访问令牌;
将所述访问令牌注入所述 Oauth API调用请求, 并将注入所述访问令牌 的 Oauth API调用请求发送至 Oauth提供商, 以使所述 Oauth API响应注入所 述访问令牌的 Oauth API调用请求并返回 Oauth API返回信息;
将所述 Oauth API返回信息返回至客户端, 以完成 Oauth API调用。
12、 根据权利要求 11所述的 Oauth API调用方法, 其特征在于, 所述客 户端请求消息包括所述客户端请求访问的 URL。
13、 根据权利要求 11所述的 Oauth API调用方法, 其特征在于, 所述客 户端请求消息包括客户端请求调用的 Oauth API标识、 授权成功后转向的业 务页面 URL , 以及调用 Oauth API的相应参数值。
14、 根据权利要求 11至 13任一所述的 Oauth API调用方法, 其特征在 于, 根据所述接口绑定信息进行授权认证, 获取访问令牌具体包括:
根据所述接口绑定信息获取授权认证接口, 并执行所述授权认证接口; 执行触发用户授权接口重定向 Oauth提供商授权页面时, 设置 Oauth提 供商的 CALLBACK为应用运行引擎接收认证结果服务的 URL;
通过接收所述认证结果服务获取验证符, 并获取访问令牌;
根据所存储的客户序列号、 所述 Oauth API标识和所述访问令牌, 将所 述客户序列号和所述 Oauth API标识进行组合以作为记录所述访问令牌的标 识, 并记录所述访问令牌。
15、 根据权利要求 11至 13任一所述的 Oauth API调用方法, 其特征在 于,根据所述 Oauth API调用请求所携带的客户序列号对所述 Oauth API调用 进行鉴权具体包括:
判断是否记录有所述 Oauth API调用请求所携带的客户序列号, 若否则 鉴权失败;
若是, 则对所述客户序列号进行解密, 获取所述客户序列号对应的明文 信息, 并根据所述客户端请求获取客户端互联网协议 IP地址、 当前会话 ID、
3 请求应用名称以及用户标识;
将所述明文信息与根据所述客户端请求获取的信息进行对应项匹配, 若 匹配则鉴权通过, 若不匹配则鉴权失败。
16、 根据权利要求 11至 13任一所述的 Oauth API调用方法, 其特征在 于, 将所述 Oauth API返回信息返回至客户端具体包括:
根据所述 Oauth API返回信息生成脚本并将所述脚本推送注入所述客户 端 或
通过回调客户端接口, 将所述 Oauth API返回信息返回至所述客户端。
17、 根据权利要求 11至 13任一所述的 Oauth API调用方法, 其特征在 于, 根据所述接口绑定信息进行授权认证具体包括:
从所述接口绑定信息中获取授权认证接口, 并运行所述授权认证接口完 成授权认证; 或
从所述接口绑定信息中获取与 Oauth SDK中接口对应的接口映射信息, 成认证授权。
18、 一种应用运行引擎, 其特征在于, 包括:
客户端客户序列号管理模块, 用于拦截客户端请求消息, 为所述客户端 分配客户序列号, 并存储客户序列号;
Oauth API 调用请求接收模块, 用于接收客户端通过调用客户端请求 Oauth API接口发送的携带有所述客户序列号的 Oauth API调用请求;
鉴权模块, 用于根据所述 Oauth API调用请求所携带的客户序列号对所 述 Oauth API调用进行鉴权, 并在鉴权通过后, 获取与请求调用的 OauthAPI 对应的接口绑定信息;
授权认证模块, 用于根据所述接口绑定信息进行授权认证, 获取访问令 牌;
Oauth API调用模块, 将所述访问令牌注入所述 Oauth API调用请求, 并 将注入所述访问令牌的 Oauth API调用请求发送至 Oauth提供商, 以使所述 Oauth API响应注入所述访问令牌的 Oauth API调用请求并返回 Oauth API返 回信息;
Oauth API返回信息处理模块,将所述 Oauth API返回信息返回至客户端,
4 以完成 Oauth API调用。
19、 根据权利要求 18所述的应用运行引擎, 其特征在于, 所述客户端请 求消息包括所述客户端请求访问的 URL。
20、 根据权利要求 18所述的应用运行引擎, 其特征在于, 所述客户端请 求消息包括客户端请求调用的 Oauth API标识、 授权成功后转向的业务页面
URL, 以及调用 Oauth API的相应参数值。
21、 根据权利要求 18至 20任一所述的应用运行引擎, 其特征在于, 所 述授权认证模块具体包括:
第一处理单元, 用于根据所述接口绑定信息获取授权认证接口, 并执行 所述授权认证接口;
第二处理单元,执行触发用户授权接口重定向 Oauth提供商授权页面时, 设置 Oauth提供商的 CALLBACK为应用运行引擎接收认证结果服务的 URL;
第三处理单元, 通过接收所述认证结果服务获取验证符, 并获取访问令 牌;
第四处理单元, 根据所存储的客户序列号、 所述 Oauth API标识和所述 访问令牌, 将所述客户序列号和所述 Oauth API标识进行组合以作为记录所 述访问令牌的标识, 并记录所述访问令牌。
22、 一种使用 Oauth API的系统, 其特征在于, 包括如权利要求 6至 10 任一所述的应用开发平台,和如权利要求 18至 21任一所述的应用运行引擎。
5
PCT/CN2013/070753 2012-01-20 2013-01-21 Oauth api的使用、调用方法、设备及系统 WO2013107403A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP17187516.4A EP3301881B1 (en) 2012-01-20 2013-01-21 Method, device and system for using and invoking oauth api
EP13738680.1A EP2806612B1 (en) 2012-01-20 2013-01-21 Method, device and system for using and invoking oauth api
US14/335,518 US9430302B2 (en) 2012-01-20 2014-07-18 Method, device and system for using and invoking Oauth API

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210018877.4 2012-01-20
CN201210018877.4A CN103220259B (zh) 2012-01-20 2012-01-20 Oauth API的使用、调用方法、设备及系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/335,518 Continuation US9430302B2 (en) 2012-01-20 2014-07-18 Method, device and system for using and invoking Oauth API

Publications (1)

Publication Number Publication Date
WO2013107403A1 true WO2013107403A1 (zh) 2013-07-25

Family

ID=48798660

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070753 WO2013107403A1 (zh) 2012-01-20 2013-01-21 Oauth api的使用、调用方法、设备及系统

Country Status (4)

Country Link
US (1) US9430302B2 (zh)
EP (2) EP3301881B1 (zh)
CN (1) CN103220259B (zh)
WO (1) WO2013107403A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10148522B2 (en) 2015-03-09 2018-12-04 Avaya Inc. Extension of authorization framework
CN110147261A (zh) * 2019-04-15 2019-08-20 平安普惠企业管理有限公司 基于调用接口的参数校验方法及相关设备
US10404699B2 (en) 2014-02-18 2019-09-03 Oracle International Corporation Facilitating third parties to perform batch processing of requests requiring authorization from resource owners for repeat access to resources
CN110912930A (zh) * 2019-12-13 2020-03-24 杭州城市大数据运营有限公司 一种数据接口管理方法
CN111158794A (zh) * 2019-12-19 2020-05-15 苏州浪潮智能科技有限公司 一种面向OpenStack的API接口组合优化方法及装置
CN112764751A (zh) * 2021-01-27 2021-05-07 深圳市酷开网络科技股份有限公司 接口生成方法和装置、接口请求方法和装置及存储介质

Families Citing this family (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9189622B2 (en) * 2013-04-30 2015-11-17 Vmware, Inc. Static redirection for objective C
CN104426719A (zh) * 2013-09-11 2015-03-18 方正信息产业控股有限公司 基于oauth协议测试的数据传递方法与装置
CN104717647B (zh) * 2013-12-13 2019-03-22 中国电信股份有限公司 业务能力鉴权方法、设备及系统
CN103780396B (zh) * 2014-01-27 2017-08-25 华为软件技术有限公司 令牌获取方法及装置
CN104199654B (zh) * 2014-08-27 2019-01-11 百度在线网络技术(北京)有限公司 开放平台的调用方法及装置
CN105681259A (zh) * 2014-11-20 2016-06-15 中兴通讯股份有限公司 一种开放授权方法、装置及开放平台
CN104732331B (zh) 2015-02-13 2017-04-12 腾讯科技(深圳)有限公司 分组管理方法、装置和系统
US11082428B2 (en) * 2015-03-10 2021-08-03 Wirepath Home Systems, Llc Systems and methods for cloud-based network control
WO2016145377A1 (en) * 2015-03-12 2016-09-15 Visa International Service Association Mutual authentication of software layers
CN105187372B (zh) * 2015-06-09 2018-05-18 深圳市腾讯计算机系统有限公司 一种基于移动应用入口的数据处理方法、装置和系统
CN105391725A (zh) * 2015-11-27 2016-03-09 深圳市摩艾客科技股份有限公司 一种真人3d数据读取模块及其数据传输方法
US10409589B2 (en) * 2016-07-12 2019-09-10 Accenture Global Solutions Limited Application centric continuous integration and delivery with automated service assurance
US11194558B2 (en) 2016-10-14 2021-12-07 Accenture Global Solutions Limited Application migration system
CN108259432A (zh) * 2016-12-29 2018-07-06 亿阳安全技术有限公司 一种api调用的管理方法、设备及系统
CN107018128B (zh) * 2017-03-07 2019-12-31 西安电子科技大学 一种基于多域协同架构第三方应用授权认证方法
US10873587B2 (en) * 2017-03-27 2020-12-22 Oracle Systems Corporation Authenticating access configuration for application programming interfaces
CN107220274B (zh) * 2017-04-13 2020-10-09 中科曙光南京研究院有限公司 一种可视化数据接口集市实现方法
CN107196943B (zh) * 2017-05-26 2019-09-20 浙江大学 一种隐私数据在第三方平台的安全展示实现方法
CN107835195B (zh) * 2017-12-04 2021-06-15 灵动元点信息技术(北京)有限公司 一种分布式网络应用节点集成管理方法
CN108418814A (zh) * 2018-02-12 2018-08-17 广州市贝聊信息科技有限公司 基于dubbo框架的接口认证方法、装置及计算机可读存储介质
EP3753234A4 (en) * 2018-04-06 2021-04-14 Samsung Electronics Co., Ltd. PROCESS AND DEVICE FOR CARRYING OUT BOARDING
CN110704026A (zh) * 2018-07-10 2020-01-17 武汉斗鱼网络科技有限公司 软件开发工具包的调用方法、装置、终端及可读介质
TWI725352B (zh) * 2018-11-05 2021-04-21 緯創資通股份有限公司 驗證及授權的方法及驗證伺服器
CN110287037B (zh) * 2019-05-20 2023-11-03 平安科技(深圳)有限公司 分布式的智能api异步回调方法及装置
CN110764793A (zh) * 2019-11-04 2020-02-07 广州市飞元信息科技有限公司 软件工具及其注册、安装、运行的方法、工具管理系统
CN111274141B (zh) * 2020-01-19 2024-02-09 苏州浪潮智能科技有限公司 一种api客户端的测试管理方法及装置
CN112131022B (zh) * 2020-09-22 2024-05-14 深圳力维智联技术有限公司 开放api管理方法、装置、系统与计算机可读存储介质
CN112235285B (zh) * 2020-10-12 2023-01-10 山东浪潮智慧医疗科技有限公司 基于非会话的用户认证模式和服务的方法及系统
CN113435898B (zh) * 2021-07-09 2022-06-14 支付宝(杭州)信息技术有限公司 数据处理方法以及系统
US20230015697A1 (en) * 2021-07-13 2023-01-19 Citrix Systems, Inc. Application programming interface (api) authorization
US12015607B2 (en) 2021-08-13 2024-06-18 The Toronto-Dominion Bank System and method for authenticating client devices communicating with an enterprise system
CN114124407A (zh) * 2021-11-25 2022-03-01 中国银行股份有限公司 基于Oauth2.0协议的后端授权认证方法及系统
CN114979103A (zh) * 2022-05-19 2022-08-30 广州数说故事信息科技有限公司 开放api集成整合及管理方法及计算机设备
CN115994004B (zh) * 2023-03-22 2023-08-29 紫光同芯微电子有限公司 一种应用程序接口调用方法及装置
CN116401650B (zh) * 2023-04-14 2023-11-14 苏州慧睿康智能科技有限公司 一种基于行列式的api有限状态安全调用方法
CN117390105B (zh) * 2023-12-11 2024-03-01 中核武汉核电运行技术股份有限公司 一种工业服务开放平台的服务录入方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633641A (zh) * 2002-02-15 2005-06-29 艾利森电话股份有限公司 移动终端平台系统的中间件服务层
CN101383845A (zh) * 2008-10-15 2009-03-11 北京邮电大学 综合业务接入装置、系统及其控制方法
CN101500344A (zh) * 2008-01-29 2009-08-05 中兴通讯股份有限公司 一种实现企业融合通信的业务平台系统
CN101562621A (zh) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 一种用户授权的方法、系统和装置
CN101969469A (zh) * 2010-10-25 2011-02-09 华为技术有限公司 电信能力开放中的回调处理方法及装置

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001063878A1 (en) * 2000-02-23 2001-08-30 Tradesafely.Com Limited Method and apparatus for internet web site accreditation
US7603469B2 (en) 2002-01-15 2009-10-13 International Business Machines Corporation Provisioning aggregated services in a distributed computing environment
KR100443621B1 (ko) * 2002-02-25 2004-08-09 주식회사 마크애니 개인용 컴퓨터 기반의 고유 아이디를 이용한 휴대용 정보단말기의 어플리케이션의 인증방법과 이를 이용한 시스템
US7421732B2 (en) * 2003-05-05 2008-09-02 Nokia Corporation System, apparatus, and method for providing generic internet protocol authentication
JP2005352908A (ja) * 2004-06-11 2005-12-22 Ntt Docomo Inc 移動通信端末及びデータアクセス制御方法
US7966652B2 (en) 2008-04-07 2011-06-21 Safemashups Inc. Mashauth: using mashssl for efficient delegated authentication
US7945774B2 (en) 2008-04-07 2011-05-17 Safemashups Inc. Efficient security for mashups
US9405896B2 (en) * 2011-04-12 2016-08-02 Salesforce.Com, Inc. Inter-application management of user credential data
US8650622B2 (en) * 2011-07-01 2014-02-11 Telefonaktiebolaget Lm Ericsson (Publ) Methods and arrangements for authorizing and authentication interworking

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1633641A (zh) * 2002-02-15 2005-06-29 艾利森电话股份有限公司 移动终端平台系统的中间件服务层
CN101500344A (zh) * 2008-01-29 2009-08-05 中兴通讯股份有限公司 一种实现企业融合通信的业务平台系统
CN101383845A (zh) * 2008-10-15 2009-03-11 北京邮电大学 综合业务接入装置、系统及其控制方法
CN101562621A (zh) * 2009-05-25 2009-10-21 阿里巴巴集团控股有限公司 一种用户授权的方法、系统和装置
CN101969469A (zh) * 2010-10-25 2011-02-09 华为技术有限公司 电信能力开放中的回调处理方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2806612A4 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10404699B2 (en) 2014-02-18 2019-09-03 Oracle International Corporation Facilitating third parties to perform batch processing of requests requiring authorization from resource owners for repeat access to resources
US10148522B2 (en) 2015-03-09 2018-12-04 Avaya Inc. Extension of authorization framework
CN110147261A (zh) * 2019-04-15 2019-08-20 平安普惠企业管理有限公司 基于调用接口的参数校验方法及相关设备
CN110912930A (zh) * 2019-12-13 2020-03-24 杭州城市大数据运营有限公司 一种数据接口管理方法
CN110912930B (zh) * 2019-12-13 2021-12-28 杭州城市大数据运营有限公司 一种数据接口管理方法
CN111158794A (zh) * 2019-12-19 2020-05-15 苏州浪潮智能科技有限公司 一种面向OpenStack的API接口组合优化方法及装置
CN111158794B (zh) * 2019-12-19 2023-03-31 苏州浪潮智能科技有限公司 一种面向OpenStack的API接口组合优化方法及装置
CN112764751A (zh) * 2021-01-27 2021-05-07 深圳市酷开网络科技股份有限公司 接口生成方法和装置、接口请求方法和装置及存储介质
CN112764751B (zh) * 2021-01-27 2024-05-24 深圳市酷开网络科技股份有限公司 接口生成方法和装置、接口请求方法和装置及存储介质

Also Published As

Publication number Publication date
EP2806612A1 (en) 2014-11-26
CN103220259B (zh) 2016-06-08
EP3301881B1 (en) 2019-04-10
EP2806612A4 (en) 2015-05-13
CN103220259A (zh) 2013-07-24
EP3301881A1 (en) 2018-04-04
US20140331240A1 (en) 2014-11-06
EP2806612B1 (en) 2017-11-08
US9430302B2 (en) 2016-08-30

Similar Documents

Publication Publication Date Title
WO2013107403A1 (zh) Oauth api的使用、调用方法、设备及系统
US10810515B2 (en) Digital rights management (DRM)-enabled policy management for an identity provider in a federated environment
JP5567011B2 (ja) インターネットサービスを提供するための方法およびサービス統合プラットフォームシステム
JP5651112B2 (ja) デジタルidを用いたフォーム入力および自動パスワード生成
US8196177B2 (en) Digital rights management (DRM)-enabled policy management for a service provider in a federated environment
CN104735066B (zh) 一种面向网页应用的单点登录方法、装置和系统
WO2017067227A1 (zh) 一种第三方账号授权方法、设备、服务器及其系统
WO2016188256A1 (zh) 一种应用接入鉴权的方法、系统、装置及终端
WO2017129016A1 (zh) 一种资源访问方法、装置及系统
CN110839087B (zh) 接口调用方法及装置、电子设备和计算机可读存储介质
CN115021991A (zh) 未经管理的移动设备的单点登录
JP2015528168A (ja) モバイルアプリケーションに対して認証トークンを事前にプロビジョニングするための方法及び機器
US20140006781A1 (en) Encapsulating the complexity of cryptographic authentication in black-boxes
CN112437078A (zh) 文件存储方法、装置、设备及计算机可读存储介质
CN111917837A (zh) 一种Web微应用程序发布系统及其实现方法
CN114785590A (zh) 登录方法、装置、设备、存储介质
US7363487B2 (en) Method and system for dynamic client authentication in support of JAAS programming model
CN113132317A (zh) 一种身份认证方法、系统及装置
CN113239308B (zh) 一种页面访问方法、装置、设备及存储介质
CN112565236B (zh) 信息鉴权方法、装置、计算机设备及存储介质
CN101789973A (zh) 一种构建糅合应用的方法及系统
TW201030637A (en) A method providing internet service and service integration platform system
CN112748960A (zh) 一种进程控制方法、装置、电子设备及存储介质
KR101259574B1 (ko) 사용자 및 단말 통합 인증 시스템 및 방법
Breggeman An Authentication Service for Domestic Self-Hosting

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: 13738680

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2013738680

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013738680

Country of ref document: EP