Method | Description | |
---|---|---|
ConcatenateRequestElements ( string method, string url, |
Creates a request elements concatentation value to send with a request. This is also known as the signature base.
|
|
ConstructRequestUrl ( |
Creates a request URL suitable for making OAuth requests. Resulting URLs must exclude port 80 or port 443 when accompanied by HTTP and HTTPS, respectively. Resulting URLs must be lower case.
|
|
GetNonce ( ) : string |
Generates a random 16-byte lowercase alphanumeric string.
|
|
GetSignature ( OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret ) : string |
Creates a signature value given a signature base and the consumer secret. This method is used when the token secret is currently unknown.
|
|
GetSignature ( OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret, string tokenSecret ) : string |
Creates a signature value given a signature base and the consumer secret and a known token secret.
|
|
GetSignature ( OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret ) : string |
Creates a signature value given a signature base and the consumer secret. This method is used when the token secret is currently unknown.
|
|
GetSignature ( OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret, string tokenSecret ) : string |
Creates a signature value given a signature base and the consumer secret and a known token secret.
|
|
GetTimestamp ( ) : string |
Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT"
|
|
GetTimestamp ( System.DateTime dateTime ) : string |
Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT"
|
|
NormalizeRequestParameters ( |
Sorts a collection of key-value pairs by name, and then value if equal, concatenating them into a single string. This string should be encoded prior to, or after normalization is run.
|
|
SortParametersExcludingSignature ( |
Sorts a WebParameterCollection by name, and then value if equal.
|
|
UrlEncodeRelaxed ( string value ) : string |
URL encodes a string based on section 5.1 of the OAuth spec. Namely, percent encoding with [RFC3986], avoiding unreserved characters, upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs. The Uri.EscapeDataString method is supposed to take on RFC 3986 behavior if certain elements are present in a .config file. Even if this actually worked (which in my experiments it doesn't), we can't rely on every host actually having this configuration element present. |
|
UrlEncodeStrict ( string value ) : string |
URL encodes a string based on section 5.1 of the OAuth spec. Namely, percent encoding with [RFC3986], avoiding unreserved characters, upper-casing hexadecimal characters, and UTF-8 encoding for text value pairs.
|
Method | Description | |
---|---|---|
OAuthTools ( ) : System |
public static ConcatenateRequestElements ( string method, string url, |
||
method | string | The request's HTTP method type |
url | string | The request URL |
parameters | The request's parameters | |
return | string |
public static ConstructRequestUrl ( |
||
url | The original request URL | |
return | string |
public static GetSignature ( OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret ) : string | ||
signatureMethod | OAuthSignatureMethod | The hashing method |
signatureTreatment | OAuthSignatureTreatment | The treatment to use on a signature value |
signatureBase | string | The signature base |
consumerSecret | string | The consumer key |
return | string |
public static GetSignature ( OAuthSignatureMethod signatureMethod, OAuthSignatureTreatment signatureTreatment, string signatureBase, string consumerSecret, string tokenSecret ) : string | ||
signatureMethod | OAuthSignatureMethod | The hashing method |
signatureTreatment | OAuthSignatureTreatment | The treatment to use on a signature value |
signatureBase | string | The signature base |
consumerSecret | string | The consumer secret |
tokenSecret | string | The token secret |
return | string |
public static GetSignature ( OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret ) : string | ||
signatureMethod | OAuthSignatureMethod | The hashing method |
signatureBase | string | The signature base |
consumerSecret | string | The consumer key |
return | string |
public static GetSignature ( OAuthSignatureMethod signatureMethod, string signatureBase, string consumerSecret, string tokenSecret ) : string | ||
signatureMethod | OAuthSignatureMethod | The hashing method |
signatureBase | string | The signature base |
consumerSecret | string | The consumer secret |
tokenSecret | string | The token secret |
return | string |
public static GetTimestamp ( System.DateTime dateTime ) : string | ||
dateTime | System.DateTime | A specified point in time. |
return | string |
public static NormalizeRequestParameters ( |
||
parameters | ||
return | string |
public static SortParametersExcludingSignature ( |
||
parameters | A collection of parameters to sort | |
return |
public static UrlEncodeRelaxed ( string value ) : string | ||
value | string | The value to escape. |
return | string |
public static UrlEncodeStrict ( string value ) : string | ||
value | string | |
return | string |