summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-03-01 21:47:47 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-03-01 23:19:23 -0800
commit862d9349ecf31b58e65072f91a5ee1956c31ba4b (patch)
tree3b4567ab2d57a40d795a71f1f9568c8df5923fdc /src
parent6cdeefcc2425979807146e0cc53b32d4d82ad42c (diff)
downloadDotNetOpenAuth-862d9349ecf31b58e65072f91a5ee1956c31ba4b.zip
DotNetOpenAuth-862d9349ecf31b58e65072f91a5ee1956c31ba4b.tar.gz
DotNetOpenAuth-862d9349ecf31b58e65072f91a5ee1956c31ba4b.tar.bz2
Replaced AspNet project's Uri.ToString() calls with Uri.AbsoluteUri
http://blog.nerdbank.net/2008/04/uriabsoluteuri-and-uritostring-are-not.html
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs6
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs2
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
index 442326e..66140c3 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/FacebookClient.cs
@@ -44,7 +44,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
MessagingUtilities.AppendQueryArgs(builder,
new KeyValuePair<string, string>[] {
new KeyValuePair<string, string>("client_id", _appId),
- new KeyValuePair<string, string>("redirect_uri", returnUrl.ToString())
+ new KeyValuePair<string, string>("redirect_uri", returnUrl.AbsoluteUri)
});
return builder.Uri;
}
@@ -55,7 +55,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
MessagingUtilities.AppendQueryArgs(builder,
new KeyValuePair<string, string>[] {
new KeyValuePair<string, string>("client_id", _appId),
- new KeyValuePair<string, string>("redirect_uri", returnUrl.ToString()),
+ new KeyValuePair<string, string>("redirect_uri", returnUrl.AbsoluteUri),
new KeyValuePair<string, string>("client_secret", _appSecret),
new KeyValuePair<string, string>("code", authorizationCode)
});
@@ -88,7 +88,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
userData.AddItemIfNotEmpty("id", graphData.Id);
userData.AddItemIfNotEmpty("username", graphData.Email);
userData.AddItemIfNotEmpty("name", graphData.Name);
- userData.AddItemIfNotEmpty("link", graphData.Link == null ? null : graphData.Link.ToString());
+ userData.AddItemIfNotEmpty("link", graphData.Link == null ? null : graphData.Link.AbsoluteUri);
userData.AddItemIfNotEmpty("gender", graphData.Gender);
userData.AddItemIfNotEmpty("birthday", graphData.Birthday);
return userData;
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
index 17a11b8..319d1d9 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/OAuth2Client.cs
@@ -52,7 +52,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
_returnUrl = returnUrl;
- string redirectUrl = GetServiceLoginUrl(returnUrl).ToString();
+ string redirectUrl = GetServiceLoginUrl(returnUrl).AbsoluteUri;
context.Response.Redirect(redirectUrl, endResponse: true);
}
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
index ffbbf26..e592c05 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/WindowsLiveClient.cs
@@ -40,7 +40,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
new KeyValuePair<string, string>("client_id", _appId),
new KeyValuePair<string, string>("scope", "wl.basic"),
new KeyValuePair<string, string>("response_type", "code"),
- new KeyValuePair<string, string>("redirect_uri", returnUrl.ToString())
+ new KeyValuePair<string, string>("redirect_uri", returnUrl.AbsoluteUri)
});
return builder.Uri;
@@ -49,7 +49,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
protected override string QueryAccessToken(Uri returnUrl, string authorizationCode) {
var builder = new StringBuilder();
builder.AppendFormat("client_id={0}", _appId);
- builder.AppendFormat("&redirect_uri={0}", Uri.EscapeDataString(returnUrl.ToString()));
+ builder.AppendFormat("&redirect_uri={0}", Uri.EscapeDataString(returnUrl.AbsoluteUri));
builder.AppendFormat("&client_secret={0}", _appSecret);
builder.AppendFormat("&code={0}", authorizationCode);
builder.Append("&grant_type=authorization_code");
@@ -91,7 +91,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
userData.AddItemIfNotEmpty("id", graph.Id);
userData.AddItemIfNotEmpty("username", graph.Name);
userData.AddItemIfNotEmpty("name", graph.Name);
- userData.AddItemIfNotEmpty("link", graph.Link == null ? null : graph.Link.ToString());
+ userData.AddItemIfNotEmpty("link", graph.Link == null ? null : graph.Link.AbsoluteUri);
userData.AddItemIfNotEmpty("gender", graph.Gender);
userData.AddItemIfNotEmpty("firstname", graph.FirstName);
userData.AddItemIfNotEmpty("lastname", graph.LastName);