C# Класс CoreTweet.OAuth

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

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

Метод Описание
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