Provides a set of static (Shared in Visual Basic) methods for OAuth authentication.
More...
|
static Task< OAuthSession > | AuthorizeAsync (string consumerKey, string consumerSecret, string oauthCallback="oob", ConnectionOptions options=null, CancellationToken cancellationToken=default(CancellationToken)) |
|
static Task< Tokens > | GetTokensAsync (this OAuthSession session, string oauthVerifier, CancellationToken cancellationToken=default(CancellationToken)) |
|
static OAuthSession | Authorize (string consumerKey, string consumerSecret, string oauthCallback="oob", ConnectionOptions options=null) |
|
static Tokens | GetTokens (this OAuthSession session, string oauthVerifier) |
|
Provides a set of static (Shared in Visual Basic) methods for OAuth authentication.
◆ Authorize()
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
-
consumerKey | The Consumer key. |
consumerSecret | The Consumer secret. |
oauthCallback | 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 | The connection options for the request. |
- Returns
- The authorize URI.
◆ AuthorizeAsync()
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
-
consumerKey | The consumer key. |
consumerSecret | The consumer secret. |
oauthCallback | 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 | The connection options for the request. |
cancellationToken | The cancellation token. |
- Returns
- The task object representing the asynchronous operation.
The Result property on the task object returns the authorize URI.
◆ GetTokens()
static Tokens CoreTweet.OAuth.GetTokens |
( |
this OAuthSession |
session, |
|
|
string |
oauthVerifier |
|
) |
| |
|
inlinestatic |
Gets the OAuth tokens.
Be sure to call Authorize before call this method.
- Parameters
-
session | The OAuth session. |
oauthVerifier | The pin code. |
- Returns
- The tokens.
◆ GetTokensAsync()
static Task<Tokens> CoreTweet.OAuth.GetTokensAsync |
( |
this OAuthSession |
session, |
|
|
string |
oauthVerifier, |
|
|
CancellationToken |
cancellationToken = default(CancellationToken) |
|
) |
| |
|
inlinestatic |
Gets the OAuth tokens as an asynchronous operation.
Be sure to call AuthorizeAsync before call this method.
- Parameters
-
session | The OAuth session. |
oauthVerifier | The pin code. |
cancellationToken | The 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: