C# Class CoreTweet.OAuth2

Mostrar archivo Open project: CoreTweet/CoreTweet

Public Methods

Method Description
GetToken ( string consumerKey, string consumerSecret, CoreTweet.ConnectionOptions options = null ) : OAuth2Token

Gets the OAuth 2 Bearer Token.

GetTokenAsync ( string consumerKey, string consumerSecret, CoreTweet.ConnectionOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Gets the OAuth 2 Bearer Token as an asynchronous operation.

InvalidateToken ( this tokens ) : string

Invalidates the OAuth 2 Bearer Token.

InvalidateTokenAsync ( this tokens, CancellationToken cancellationToken = default(CancellationToken) ) : Task

Invalidates the OAuth 2 Bearer Token as an asynchronous operation.

Private Methods

Method Description
CreateCredentials ( string consumerKey, string consumerSecret ) : string
GetAccessTokenUrl ( CoreTweet.ConnectionOptions options ) : Uri
GetInvalidateTokenUrl ( CoreTweet.ConnectionOptions options ) : Uri

Method Details

GetToken() public static method

Gets the OAuth 2 Bearer Token.
public static GetToken ( string consumerKey, string consumerSecret, CoreTweet.ConnectionOptions options = null ) : OAuth2Token
consumerKey string The consumer key.
consumerSecret string The consumer secret.
options CoreTweet.ConnectionOptions The connection options for the request.
return OAuth2Token

GetTokenAsync() public static method

Gets the OAuth 2 Bearer Token as an asynchronous operation.
public static GetTokenAsync ( string consumerKey, string consumerSecret, CoreTweet.ConnectionOptions options = null, CancellationToken cancellationToken = default(CancellationToken) ) : Task
consumerKey string The consumer key.
consumerSecret string The consumer secret.
options CoreTweet.ConnectionOptions The connection options for the request.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task

InvalidateToken() public static method

Invalidates the OAuth 2 Bearer Token.
public static InvalidateToken ( this tokens ) : string
tokens this An instance of .
return string

InvalidateTokenAsync() public static method

Invalidates the OAuth 2 Bearer Token as an asynchronous operation.
public static InvalidateTokenAsync ( this tokens, CancellationToken cancellationToken = default(CancellationToken) ) : Task
tokens this An instance of OAuth2Tokens.
cancellationToken System.Threading.CancellationToken The cancellation token.
return Task