C# Class OAuth.OAuthRequest

Inheritance: OAuthBase
显示文件 Open project: samo9789/sharpOAuth Class Usage Examples

Public Methods

Method Description
OAuthRequest ( OAuthConsumer consumer, string debugType ) : System
request ( Uri url, string httpMethod, string oauthToken, string oauthTokenSecret, List extraParameters ) : string

Calls a webservice specified by its url and passing it the parameters

Private Methods

Method Description
_generateNonce ( ) : string

Generates an OAuth Nonce

_generateSignature ( Uri url, string httpMethod, List parameters, string signatureMethod, string consumerSecret, string oauth_token, string &normalizedUrl, string &normalizedUrlWithParameters ) : string

Generates the request signature for OAuth call

_generateSignatureBase ( Uri url, string httpMethod, List parameters, string consumerSecret, string &normalizedUrl, string &normalizedRequestParameters ) : string

Normalizes the query parameters by sorting them according to the OAuth specification Generates the signature base

_generateSignatureUsingHash ( string signatureBase, HMACSHA1 hmacsha1 ) : string

Generates the request signature using the hash

_generateTimestamp ( ) : string

Generates the OAuth timestamp in number of seconds since January 1st 1970

Method Details

OAuthRequest() public method

public OAuthRequest ( OAuthConsumer consumer, string debugType ) : System
consumer OAuthConsumer
debugType string
return System

request() public method

Calls a webservice specified by its url and passing it the parameters
public request ( Uri url, string httpMethod, string oauthToken, string oauthTokenSecret, List extraParameters ) : string
url System.Uri Url of the service to call
httpMethod string
oauthToken string oauth token (if exists)
oauthTokenSecret string oauth token secret (if exists)
extraParameters List the list of parameters to send the service
return string