Fixed OpenIdConnectBackChannelHttpHandler's path to the configuration file

This commit is contained in:
Kiran Challa 2015-11-30 13:45:03 -08:00
parent a2f5fcbd2d
commit d584c09413
3 changed files with 29 additions and 5 deletions

View File

@ -14,8 +14,7 @@ namespace MusicStore.Mocks.OpenIdConnect
var basePath = Path.GetFullPath(Path.Combine(
Directory.GetCurrentDirectory(), "..", "..",
"test", "E2ETests", "compiler", "shared", "Mocks",
"OpenIdConnect"));
"shared", "Mocks","OpenIdConnect"));
if (request.RequestUri.AbsoluteUri == "https://login.windows.net/[tenantName].onmicrosoft.com/.well-known/openid-configuration")
{
@ -29,5 +28,5 @@ namespace MusicStore.Mocks.OpenIdConnect
return Task.FromResult(response);
}
}
}
}
#endif

View File

@ -0,0 +1,25 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:4088/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"Hosting:Environment": "Development"
}
},
"web": {
"commandName": "web",
"environmentVariables": {
"Hosting:Environment": "Development"
}
}
}
}

View File

@ -30,8 +30,8 @@ namespace E2ETests
var content = new FormUrlEncodedContent(formParameters.ToArray());
response = await _httpClient.PostAsync("Account/ExternalLogin", content);
Assert.Equal<string>("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/oauth2/authorize", response.Headers.Location.AbsoluteUri.Replace(response.Headers.Location.Query, string.Empty));
var queryItems = new QueryCollection(QueryHelpers.ParseQuery(response.Headers.Location.Query));
Assert.Equal<string>("https://login.windows.net/4afbc689-805b-48cf-a24c-d4aa3248a248/oauth2/authorize", response.Headers.Location?.AbsoluteUri.Replace(response.Headers.Location.Query, string.Empty));
var queryItems = new QueryCollection(QueryHelpers.ParseQuery(response.Headers.Location?.Query));
Assert.Equal<string>("c99497aa-3ee2-4707-b8a8-c33f51323fef", queryItems["client_id"]);
Assert.Equal<string>("form_post", queryItems["response_mode"]);
Assert.Equal<string>("code id_token", queryItems["response_type"]);