C# Class TweetSource.OAuth.AuthorizationHeader

Utility class for encoding 'Authorization' part in HTTP header to access resource from URL that requires OAuth. For our case, it is for Streaming API in Twitter. This is based from original source code by Gary Short: http://garyshortblog.wordpress.com/2011/02/11/a-twitter-oauth-example-in-c/
显示文件 Open project: nkuln/tweetsource

Public Methods

Method Description
Create ( HttpParameterSet parameters ) : AuthorizationHeader

Create a new AuthorizationHeader based on OAuth keys and some HTTP request parameters required to generate correct OAuth signature.

GetHeaderString ( ) : string

Header string to be used in 'Authorization' part of HTTPWebRequest's header. This can be added to request using HttpWebRequest.Headers.Add(..) method.

Method Details

Create() public static method

Create a new AuthorizationHeader based on OAuth keys and some HTTP request parameters required to generate correct OAuth signature.
public static Create ( HttpParameterSet parameters ) : AuthorizationHeader
parameters HttpParameterSet Parameters REQUIRED by OAuth
return AuthorizationHeader

GetHeaderString() public abstract method

Header string to be used in 'Authorization' part of HTTPWebRequest's header. This can be added to request using HttpWebRequest.Headers.Add(..) method.
public abstract GetHeaderString ( ) : string
return string