CoreTweet  0.7.0
Yet another .NET Twitter Library
Classes | Static Public Member Functions | List of all members
CoreTweet.OAuth Class Reference

Provides a set of static (Shared in Visual Basic) methods for OAuth authentication. More...

Classes

class  OAuthSession
 Represents an OAuth session. More...
 

Static Public Member Functions

static Task< OAuthSessionAuthorizeAsync (string consumerKey, string consumerSecret, string oauthCallback="oob", ConnectionOptions options=null, CancellationToken cancellationToken=default(CancellationToken))
 
static Task< TokensGetTokensAsync (this OAuthSession session, string pin, CancellationToken cancellationToken=default(CancellationToken))
 
static OAuthSession Authorize (string consumerKey, string consumerSecret, string oauthCallback="oob", ConnectionOptions options=null)
 
static Tokens GetTokens (this OAuthSession session, string pin)
 

Detailed Description

Provides a set of static (Shared in Visual Basic) methods for OAuth authentication.

Member Function Documentation

static OAuthSession CoreTweet.OAuth.Authorize ( string  consumerKey,
string  consumerSecret,
string  oauthCallback = "oob",
ConnectionOptions  options = null 
)
inlinestatic

Generates the authorize URI.

Then call GetTokens after get the pin code.

Parameters
consumerKeyThe Consumer key.
consumerSecretThe Consumer secret.
oauthCallbackFor 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.
optionsThe connection options for the request.
Returns
The authorize URI.
static Task<OAuthSession> CoreTweet.OAuth.AuthorizeAsync ( string  consumerKey,
string  consumerSecret,
string  oauthCallback = "oob",
ConnectionOptions  options = null,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinestatic

Generates the authorize URI as an asynchronous operation.

Then call GetTokensAsync after get the pin code.

Parameters
consumerKeyThe consumer key.
consumerSecretThe consumer secret.
oauthCallbackFor 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.
optionsThe connection options for the request.
cancellationTokenThe cancellation token.
Returns
The task object representing the asynchronous operation.

The Result property on the task object returns the authorize URI.

static Tokens CoreTweet.OAuth.GetTokens ( this OAuthSession  session,
string  pin 
)
inlinestatic

Gets the OAuth tokens.

Be sure to call Authorize before call this method.

Parameters
sessionThe OAuth session.
pinThe pin code.
Returns
The tokens.
static Task<Tokens> CoreTweet.OAuth.GetTokensAsync ( this OAuthSession  session,
string  pin,
CancellationToken  cancellationToken = default(CancellationToken) 
)
inlinestatic

Gets the OAuth tokens as an asynchronous operation.

Be sure to call AuthorizeAsync before call this method.

Parameters
sessionThe OAuth session.
pinThe pin code.
cancellationTokenThe cancellation token.
Returns
The task object representing the asynchronous operation.

The Result property on the task object returns the tokens.


The documentation for this class was generated from the following files: