C# 클래스 WeiranZhang.InstapaperAPI.OAuthHelper

파일 보기 프로젝트 열기: weiran/Metropaper

공개 메소드들

메소드 설명
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