Я пытаюсь получить ядро ASP.Net для проверки подлинности с помощью Thinktecture V2 uising OpenID Connect (нам в настоящее время требуется WS-Trust, поэтому обновление не может быть обновлено).Настройка ядра ASP.Net для проверки подлинности с использованием OIDC против Thinktecture V2
Моя конфигурация выглядит следующим образом
app.UseCookieAuthentication(new CookieAuthenticationOptions());
X509Store certStore = new X509Store(StoreName.My, StoreLocation.LocalMachine);
certStore.Open(OpenFlags.ReadOnly);
var cert = certStore.Certificates.Find(X509FindType.FindByThumbprint, "CertThumbprint", false);
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
RequireHttpsMetadata = false,
ClientId = _config["OpenID:ClientId"],
ClientSecret = _config["OpenID:ClientSecret"],
Authority = _config["OpenID:Authority"],
ResponseType = OpenIdConnectResponseType.Code,
PostLogoutRedirectUri = _config["OpenID:PostLogoutRedirectUri"],
SignInScheme = "Cookies",
CallbackPath = "/signin-oidc",
TokenValidationParameters = new TokenValidationParameters()
{
IssuerSigningKey = new X509SecurityKey(cert[0]),
},
Configuration = new OpenIdConnectConfiguration
{
Issuer = "https://identityserver/IdentityServer/issue",
AuthorizationEndpoint = "https://identityserver/IdentityServer/issue/oidc/authorize",
TokenEndpoint = "https://identityserver/IdentityServer/issue/oidc/token",
UserInfoEndpoint = "https://identityserver/IdentityServer/issue/oidc/userinfo",
}
});
config.json
"OpenID": {
"ClientId": "Test",
"ClientSecret": "{6DD502AB-2AB1-4028-BD4A-85C91790EC7B}",
"Authority": "https://identityserver/IdentityServer/issue/oidc",
"PostLogoutRedirectUri": "https://localhost:44353/" }
Когда я пытаюсь и аутентифицировать я получаю следующее исключение:
HttpRequestException: Ответ код состояния не указывает успех : ошибка 400, неверный запрос).
След от thinktectureIdentityServer.svclog является
Если кто-то может дать какой-либо помощи было бы весьма признателен.