summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Bablani <girishb@microsoft.com>2013-05-19 03:00:25 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2013-05-26 06:56:47 -0700
commite76acf322a3fc6d4bb52e88d1a2ae804234916e3 (patch)
treead138d8400b64c3ed84051712f720167cf302360
parent789f14adf18e65ab416b60341bfbecc6577a1c37 (diff)
downloadDotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.zip
DotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.tar.gz
DotNetOpenAuth-e76acf322a3fc6d4bb52e88d1a2ae804234916e3.tar.bz2
Changed "global" endpoint to "common" endpoint to fix breaking change. Updated appid for sample app.
-rw-r--r--samples/DotNetOpenAuth.ApplicationBlock/azureadclient.cs4
-rw-r--r--samples/OAuthClient/Web.config2
-rw-r--r--src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs11
3 files changed, 9 insertions, 8 deletions
diff --git a/samples/DotNetOpenAuth.ApplicationBlock/azureadclient.cs b/samples/DotNetOpenAuth.ApplicationBlock/azureadclient.cs
index 2da2bc5..70a97b4 100644
--- a/samples/DotNetOpenAuth.ApplicationBlock/azureadclient.cs
+++ b/samples/DotNetOpenAuth.ApplicationBlock/azureadclient.cs
@@ -17,8 +17,8 @@ namespace DotNetOpenAuth.ApplicationBlock
{
private static readonly AuthorizationServerDescription AzureADDescription = new AuthorizationServerDescription
{
- TokenEndpoint = new Uri("https://login.windows.net/global/oauth2/token"),
- AuthorizationEndpoint = new Uri("https://login.windows.net/global/oauth2/authorize?resource=00000002-0000-0000-c000-000000000000/graph.windows.net"),
+ TokenEndpoint = new Uri("https://login.windows.net/common/oauth2/token"),
+ AuthorizationEndpoint = new Uri("https://login.windows.net/common/oauth2/authorize?resource=00000002-0000-0000-c000-000000000000/graph.windows.net"),
};
/// <summary>
diff --git a/samples/OAuthClient/Web.config b/samples/OAuthClient/Web.config
index 4311d72..c9aa3a9 100644
--- a/samples/OAuthClient/Web.config
+++ b/samples/OAuthClient/Web.config
@@ -56,7 +56,7 @@
<add key="windowsLiveAppID" value="000000004408E558" />
<add key="windowsLiveAppSecret" value="od8NVdanEIWqmlKu9hOepBE3AfUu4jCw" />
<!-- AzureAD sign-up: http://manage.windowsazure.com -->
- <add key="AzureADAppID" value="64e0b14b-43ae-497c-b1a8-e8a841a341fd" />
+ <add key="AzureADAppID" value="5804ee46-32df-48ff-8fbc-6f06baabca1c" />
<add key="AzureADAppSecret" value="MySecretPassword" />
</appSettings>
<connectionStrings/>
diff --git a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
index 578975c..f596ba0 100644
--- a/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
+++ b/src/DotNetOpenAuth.AspNet/Clients/OAuth2/AzureADClient.cs
@@ -30,17 +30,17 @@ namespace DotNetOpenAuth.AspNet.Clients {
/// <summary>
/// The authorization endpoint.
/// </summary>
- private const string AuthorizationEndpoint = "https://login.windows.net/global/oauth2/authorize";
+ private const string AuthorizationEndpoint = "https://login.windows.net/common/oauth2/authorize";
/// <summary>
/// The token endpoint.
/// </summary>
- private const string TokenEndpoint = "https://login.windows.net/global/oauth2/token";
+ private const string TokenEndpoint = "https://login.windows.net/common/oauth2/token";
/// <summary>
/// The name of the graph resource.
/// </summary>
- private const string GraphResource = "00000002-0000-0000-c000-000000000000/graph.windows.net";
+ private const string GraphResource = "https://graph.windows.net";
/// <summary>
/// The URL to get the token decoding certificate from.
@@ -151,7 +151,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
{ "response_type", "code" },
{ "resource", this.resource },
});
- return builder.Uri;
+ return builder.Uri;
}
/// <summary>
@@ -169,7 +169,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
AzureADGraph graphData;
WebRequest request =
WebRequest.Create(
- GraphEndpoint + this.tenantid + "/users/" + this.userid + "?api-version=0.9");
+ GraphEndpoint + this.tenantid + "/users/" + this.userid + "?api-version=2013-04-05");
request.Headers = new WebHeaderCollection();
request.Headers.Add("authorization", accessToken);
using (var response = request.GetResponse())
@@ -218,6 +218,7 @@ namespace DotNetOpenAuth.AspNet.Clients {
{ "client_secret", this.appSecret },
{ "code", authorizationCode },
{ "grant_type", "authorization_code" },
+ {"api_version","1.0"},
});
WebRequest tokenRequest = WebRequest.Create(TokenEndpoint);