Resource access method and apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorKepeng Li
Life of this patent
Estimating the term…
Abstract
The present invention relates to the field of communication technologies, and particularly, to a resource access method and apparatus. In the solution, even if a client cannot directly communicate with an authorization server, the client can still initiate authorization verification to the authorization server by using a resource server. Then, the resource server returns a resource access response to the client when receiving an authorization response returned by the authorization server. This resolves a current disadvantage that the client cannot access a resource.
Claims11
A method, comprising:
- sending, by a client device, a request to a resource directory server, wherein the request carries identifier information of a resource server corresponding to an authorization server, and the request requests to obtain an address of the authorization server;
- receiving, by the client device, address information of the authorization server that is returned by the resource directory server;
- sending, by the client device, an authorization request to the authorization server according to the address information, wherein the authorization request carries instruction information instructing to obtain an authorization information identifier;
- receiving, by the client device, the authorization information identifier, the authorization information identifier corresponding to authorization information that is generated by the authorization server according to the instruction information;
- sending, by the client device to the resource server, a resource access request carrying the authorization information identifier;
- and
- receiving, by the client device, a resource access response returned by the resource server, wherein the resource access response is returned after the resource server receives, according to the authorization information identifier, an authorization response sent by the authorization server.
A client device, comprising:
- a transmitter, configured to:
- send a request to a resource directory server, wherein the request carries identifier information of a resource server corresponding to an authorization server, and the request requests to obtain an address of the authorization server;
- and
- send an authorization request to the authorization server according to address information of the authorization server, wherein the authorization request carries instruction information instructing to obtain an authorization information identifier;
- and
- a receiver, configured to:
- receive the address information of the authorization server that is returned by the resource directory server;
- and
- receive the authorization information identifier, wherein the authorization information identifier corresponds to authorization information that is generated by the authorization server according to the instruction information;
- wherein the transmitter is further configured to send, to the resource server, a resource access request carrying the authorization information identifier;
- and
- wherein the receiver is further configured to receive a resource access response returned by the resource server, wherein the resource access response is returned after the resource server receives, according to the authorization information identifier, an authorization response sent by the authorization server.
A resource server, comprising:
- a receiver, configured to:
- receive a resource access request that carries an authorization information identifier and that is sent by a client device, wherein the authorization information identifier is generated by an authorization server according to instruction information that instructs to obtain the authorization information identifier and that is sent by the client device;
- a processor, configured to parse the authorization information identifier, to obtain digital signature information;
- and
- a transmitter, configured to, after the digital signature information is successfully verified, send, to the authorization server, an authorization request carrying an access token identifier;
- wherein the receiver is further configured to receive an authorization response that is returned by the authorization server according to the access token identifier;
- and
- wherein the transmitter is further configured to return a resource access response to the client device according to the authorization response.
Dependencies are inferred from the claim text.