C# Class RestSharp.Authenticators.OAuth.OAuthWorkflow

A class to encapsulate OAuth authentication flow. http://oauth.net/core/1.0#anchor9
ファイルを表示 Open project: nicwise/RestSharp Class Usage Examples

Public Methods

Method Description
BuildAccessTokenInfo ( string method ) : OAuthWebQueryInfo

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging a request token for an access token authorized by the user at the Service Provider site.

BuildAccessTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging a request token for an access token authorized by the user at the Service Provider site.

BuildClientAuthAccessTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging user credentials for an access token authorized by the user at the Service Provider site.

BuildProtectedResourceInfo ( string method, WebParameterCollection parameters, string url ) : OAuthWebQueryInfo
BuildRequestTokenInfo ( string method ) : OAuthWebQueryInfo

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of requesting an unauthorized request token.

BuildRequestTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of requesting an unauthorized request token.

Private Methods

Method Description
AddAuthParameters ( ICollection parameters, string timestamp, string nonce ) : void
AddXAuthParameters ( ICollection parameters, string timestamp, string nonce ) : void
ValidateAccessRequestState ( ) : void
ValidateClientAuthAccessRequestState ( ) : void
ValidateProtectedResourceState ( ) : void
ValidateTokenRequestState ( ) : void

Method Details

BuildAccessTokenInfo() public method

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging a request token for an access token authorized by the user at the Service Provider site.
public BuildAccessTokenInfo ( string method ) : OAuthWebQueryInfo
method string The HTTP method for the intended request
return OAuthWebQueryInfo

BuildAccessTokenInfo() public method

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging a request token for an access token authorized by the user at the Service Provider site.
public BuildAccessTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo
method string The HTTP method for the intended request
parameters WebParameterCollection Any existing, non-OAuth query parameters desired in the request
return OAuthWebQueryInfo

BuildClientAuthAccessTokenInfo() public method

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of exchanging user credentials for an access token authorized by the user at the Service Provider site.
public BuildClientAuthAccessTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo
method string The HTTP method for the intended request
parameters WebParameterCollection Any existing, non-OAuth query parameters desired in the request
return OAuthWebQueryInfo

BuildProtectedResourceInfo() public method

public BuildProtectedResourceInfo ( string method, WebParameterCollection parameters, string url ) : OAuthWebQueryInfo
method string
parameters WebParameterCollection
url string
return OAuthWebQueryInfo

BuildRequestTokenInfo() public method

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of requesting an unauthorized request token.
public BuildRequestTokenInfo ( string method ) : OAuthWebQueryInfo
method string The HTTP method for the intended request
return OAuthWebQueryInfo

BuildRequestTokenInfo() public method

Generates a OAuthWebQueryInfo instance to pass to an IAuthenticator for the purpose of requesting an unauthorized request token.
public BuildRequestTokenInfo ( string method, WebParameterCollection parameters ) : OAuthWebQueryInfo
method string The HTTP method for the intended request
parameters WebParameterCollection Any existing, non-OAuth query parameters desired in the request
return OAuthWebQueryInfo