C# Класс WeiranZhang.InstapaperAPI.OAuthHelper

Показать файл Открыть проект

Открытые методы

Метод Описание
GetNonce ( ) : string

Generates a random 16-byte lowercase alphanumeric string.

GetSignature ( 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"

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.

Приватные методы

Метод Описание
OAuthHelper ( ) : System

Описание методов

GetNonce() публичный статический Метод

Generates a random 16-byte lowercase alphanumeric string.
public static GetNonce ( ) : string
Результат string

GetSignature() публичный статический Метод

Creates a signature value given a signature base and the consumer secret and a known token secret.
public static GetSignature ( string signatureBase, string consumerSecret, string tokenSecret ) : string
signatureBase string The signature base
consumerSecret string The consumer secret
tokenSecret string The token secret
Результат string

GetTimestamp() публичный статический Метод

Generates a timestamp based on the current elapsed seconds since '01/01/1970 0000 GMT"
public static GetTimestamp ( ) : string
Результат string

GetTimestamp() публичный статический Метод

Generates a timestamp based on the elapsed seconds of a given time since '01/01/1970 0000 GMT"
public static GetTimestamp ( System.DateTime dateTime ) : string
dateTime System.DateTime A specified point in time.
Результат string

UrlEncodeRelaxed() публичный статический Метод

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.
public static UrlEncodeRelaxed ( string value ) : string
value string The value to escape.
Результат string