Fixed OpenIdConnectBackChannelHttpHandler's path to the configuration file
This commit is contained in:
parent
a2f5fcbd2d
commit
d584c09413
|
|
@ -14,8 +14,7 @@ namespace MusicStore.Mocks.OpenIdConnect
|
||||||
|
|
||||||
var basePath = Path.GetFullPath(Path.Combine(
|
var basePath = Path.GetFullPath(Path.Combine(
|
||||||
Directory.GetCurrentDirectory(), "..", "..",
|
Directory.GetCurrentDirectory(), "..", "..",
|
||||||
"test", "E2ETests", "compiler", "shared", "Mocks",
|
"shared", "Mocks","OpenIdConnect"));
|
||||||
"OpenIdConnect"));
|
|
||||||
|
|
||||||
if (request.RequestUri.AbsoluteUri == "https://login.windows.net/[tenantName].onmicrosoft.com/.well-known/openid-configuration")
|
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);
|
return Task.FromResult(response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -30,8 +30,8 @@ namespace E2ETests
|
||||||
|
|
||||||
var content = new FormUrlEncodedContent(formParameters.ToArray());
|
var content = new FormUrlEncodedContent(formParameters.ToArray());
|
||||||
response = await _httpClient.PostAsync("Account/ExternalLogin", content);
|
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));
|
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));
|
var queryItems = new QueryCollection(QueryHelpers.ParseQuery(response.Headers.Location?.Query));
|
||||||
Assert.Equal<string>("c99497aa-3ee2-4707-b8a8-c33f51323fef", queryItems["client_id"]);
|
Assert.Equal<string>("c99497aa-3ee2-4707-b8a8-c33f51323fef", queryItems["client_id"]);
|
||||||
Assert.Equal<string>("form_post", queryItems["response_mode"]);
|
Assert.Equal<string>("form_post", queryItems["response_mode"]);
|
||||||
Assert.Equal<string>("code id_token", queryItems["response_type"]);
|
Assert.Equal<string>("code id_token", queryItems["response_type"]);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue