summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2013-06-09 17:07:06 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-06-09 17:07:06 -0700
commit0dcf809712533cdcb601aa973658647d5eea5f8a (patch)
tree9338f6613c5f5f8135fa4bcc1d2eb6b48fb097ca
parentc645128d5a5d768506351190c5741ac9fd19e9f2 (diff)
downloadDotNetOpenAuth-0dcf809712533cdcb601aa973658647d5eea5f8a.zip
DotNetOpenAuth-0dcf809712533cdcb601aa973658647d5eea5f8a.tar.gz
DotNetOpenAuth-0dcf809712533cdcb601aa973658647d5eea5f8a.tar.bz2
Fixes string representation of an access token in the sample.
-rw-r--r--samples/OAuthConsumer/SampleWcf.aspx.cs2
-rw-r--r--src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessToken.cs10
2 files changed, 11 insertions, 1 deletions
diff --git a/samples/OAuthConsumer/SampleWcf.aspx.cs b/samples/OAuthConsumer/SampleWcf.aspx.cs
index 764b4d7..7dc6052 100644
--- a/samples/OAuthConsumer/SampleWcf.aspx.cs
+++ b/samples/OAuthConsumer/SampleWcf.aspx.cs
@@ -33,7 +33,7 @@
var accessTokenMessage = await consumer.ProcessUserAuthorizationAsync(this.Request.Url);
if (accessTokenMessage != null) {
Session["WcfAccessToken"] = accessTokenMessage.AccessToken;
- this.authorizationLabel.Text = "Authorized! Access token: " + accessTokenMessage.AccessToken;
+ this.authorizationLabel.Text = "Authorized! Access token: " + accessTokenMessage.AccessToken.Token;
}
}
}
diff --git a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessToken.cs b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessToken.cs
index 20e3ec4..4e00f20 100644
--- a/src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessToken.cs
+++ b/src/DotNetOpenAuth.OAuth.Consumer/OAuth/AccessToken.cs
@@ -35,5 +35,15 @@ namespace DotNetOpenAuth.OAuth {
/// The secret.
/// </value>
public string Secret { get; set; }
+
+ /// <summary>
+ /// Returns a <see cref="System.String" /> that represents this instance.
+ /// </summary>
+ /// <returns>
+ /// A <see cref="System.String" /> that represents this instance.
+ /// </returns>
+ public override string ToString() {
+ return this.Token;
+ }
}
}