C# 클래스 CoreTweet.OAuth

파일 보기 프로젝트 열기: CoreTweet/CoreTweet

공개 메소드들

메소드 설명
Authorize ( string consumerKey, string consumerSecret, string oauthCallback = "oob", CoreTweet.ConnectionOptions options = null ) : OAuthSession

Generates the authorize URI.

Then call GetTokens after get the pin code.

AuthorizeAsync ( string consumerKey, string consumerSecret, string oauthCallback = "oob", CoreTweet.ConnectionOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Generates the authorize URI as an asynchronous operation.

Then call GetTokensAsync after get the pin code.

GetTokens ( this session, string oauthVerifier ) : Tokens

Gets the OAuth tokens.

Be sure to call Authorize before call this method.

GetTokensAsync ( this session, string pin, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Gets the OAuth tokens as an asynchronous operation.

Be sure to call AuthorizeAsync before call this method.

비공개 메소드들

메소드 설명
GetAccessTokenUrl ( CoreTweet.ConnectionOptions options ) : Uri
GetRequestTokenUrl ( CoreTweet.ConnectionOptions options ) : Uri

메소드 상세

Authorize() 공개 정적인 메소드

Generates the authorize URI.

Then call GetTokens after get the pin code.

public static Authorize ( string consumerKey, string consumerSecret, string oauthCallback = "oob", CoreTweet.ConnectionOptions options = null ) : OAuthSession
consumerKey string The Consumer key.
consumerSecret string The Consumer secret.
oauthCallback string /// For OAuth 1.0a compliance this parameter is required. /// The value you specify here will be used as the URL a user is redirected to should they approve your application's access to their account. /// Set this to oob for out-of-band pin mode. /// This is also how you specify custom callbacks for use in desktop/mobile applications. /// Always send an oauth_callback on this step, regardless of a pre-registered callback. ///
options CoreTweet.ConnectionOptions The connection options for the request.
리턴 OAuthSession

AuthorizeAsync() 공개 정적인 메소드

Generates the authorize URI as an asynchronous operation.

Then call GetTokensAsync after get the pin code.

public static AuthorizeAsync ( string consumerKey, string consumerSecret, string oauthCallback = "oob", CoreTweet.ConnectionOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
consumerKey string The consumer key.
consumerSecret string The consumer secret.
oauthCallback string /// For OAuth 1.0a compliance this parameter is required. /// The value you specify here will be used as the URL a user is redirected to should they approve your application's access to their account. /// Set this to oob for out-of-band pin mode. /// This is also how you specify custom callbacks for use in desktop/mobile applications. /// Always send an oauth_callback on this step, regardless of a pre-registered callback. ///
options CoreTweet.ConnectionOptions The connection options for the request.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task

GetTokens() 공개 정적인 메소드

Gets the OAuth tokens.

Be sure to call Authorize before call this method.

public static GetTokens ( this session, string oauthVerifier ) : Tokens
session this The OAuth session.
oauthVerifier string The pin code.
리턴 Tokens

GetTokensAsync() 공개 정적인 메소드

Gets the OAuth tokens as an asynchronous operation.

Be sure to call AuthorizeAsync before call this method.

public static GetTokensAsync ( this session, string pin, CancellationToken cancellationToken = default(CancellationToken) ) : Task
session this The OAuth session.
pin string The pin code.
cancellationToken System.Threading.CancellationToken The cancellation token.
리턴 Task