summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-02-18 22:08:07 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2013-02-18 22:08:07 -0800
commit32270c7413e7a2c37a02341a0894e2447f6d74f7 (patch)
tree05f6cf8566c7b4a2661a01d08967e91f05778837 /samples
parent549017cdf590ea4ce4d8ad55c013c33a506133a3 (diff)
downloadDotNetOpenAuth-32270c7413e7a2c37a02341a0894e2447f6d74f7.zip
DotNetOpenAuth-32270c7413e7a2c37a02341a0894e2447f6d74f7.tar.gz
DotNetOpenAuth-32270c7413e7a2c37a02341a0894e2447f6d74f7.tar.bz2
Matured the OAuth 1 consumer signing handler a bit.
Diffstat (limited to 'samples')
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs3
-rw-r--r--samples/OAuthConsumer/SignInWithTwitter.aspx.cs2
-rw-r--r--samples/OAuthConsumer/Twitter.aspx.cs3
3 files changed, 3 insertions, 5 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs b/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs
index 48e6b4b..1ae9f84 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/TwitterConsumer.cs
@@ -135,8 +135,7 @@ namespace DotNetOpenAuth.ApplicationBlock {
public static async Task<JArray> GetUpdatesAsync(
ConsumerBase twitter, string accessToken, CancellationToken cancellationToken = default(CancellationToken)) {
- var authorizingHandler = new OAuth1HttpMessageHandler(twitter.Channel.HostFactories.CreateHttpMessageHandler(), twitter, accessToken);
- using (var httpClient = twitter.Channel.HostFactories.CreateHttpClient(authorizingHandler)) {
+ using (var httpClient = twitter.CreateHttpClient(accessToken)) {
using (var response = await httpClient.GetAsync(GetFriendTimelineStatusEndpoint.Location, cancellationToken)) {
response.EnsureSuccessStatusCode();
string jsonString = await response.Content.ReadAsStringAsync();
diff --git a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
index b9d19ef..f90d557 100644
--- a/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
+++ b/samples/OAuthConsumer/SignInWithTwitter.aspx.cs
@@ -9,8 +9,8 @@
using System.Web.UI.WebControls;
using System.Xml.Linq;
using System.Xml.XPath;
- using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.ApplicationBlock;
+ using DotNetOpenAuth.Messaging;
using DotNetOpenAuth.OAuth;
public partial class SignInWithTwitter : System.Web.UI.Page {
diff --git a/samples/OAuthConsumer/Twitter.aspx.cs b/samples/OAuthConsumer/Twitter.aspx.cs
index a89c3bf..6ff6993 100644
--- a/samples/OAuthConsumer/Twitter.aspx.cs
+++ b/samples/OAuthConsumer/Twitter.aspx.cs
@@ -10,9 +10,8 @@
using System.Xml.Linq;
using System.Xml.XPath;
using DotNetOpenAuth.ApplicationBlock;
- using DotNetOpenAuth.OAuth;
-
using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.OAuth;
public partial class Twitter : System.Web.UI.Page {
private string AccessToken {