public OAuthElement(Consumer consumer, AccessToken token, XmlDocument doc) : base("oauth", "urn:xmpp:tmp:oauth", doc) { this.ConsumerKey = consumer.Key; this.Token = token.Token; this.Version = consumer.OAuthVersion; this.Nonce = OAuth.Helper.GenerateNonce(); this.Timestamp = OAuth.Helper.GenerateTimestamp(); this.SignatureMethod = consumer.SignatureMethod; }
public static void Main(string[] args) { if (args.Length != 2) { Console.WriteLine("Usage: FireEagleExample.exe consumer_key consumer_secret"); return; } var consumer = new Consumer(args[0], args[1]) { Site = "https://fireeagle.yahooapis.com", AuthorizeUrl = "https://fireeagle.yahoo.net/oauth/authorize" }; var requestToken = consumer.GetRequestToken(); Console.WriteLine("Visit this URL in your web browser, then press Enter:"); Console.WriteLine(requestToken.AuthorizeUrl); Console.ReadLine(); var accessToken = requestToken.ConvertToAccessToken(); var response = consumer.Request("GET", new Uri("https://fireeagle.yahooapis.com/api/0.1/user"), accessToken); Console.WriteLine(response); }
public AccessToken(Consumer consumer, string token, string secret) : base(consumer, token, secret) { }
public RequestToken(Consumer consumer, string token, string secret) : base(consumer, token, secret) { }
public ConsumerToken(Consumer consumer, string token, string secret) : base(token, secret) { m_Consumer = consumer; }