ASP.NET MVC 4.5.2 Herstellen einer Verbindung zu IdentityServer4
Ich habe eine Website, auf der ASP.NET MVC 4.5.2 ausgeführt wird. Ich habe einen IdentityServer4-Server, aber wenn ich versuche, mich dagegen zu authentifizieren, erhalte ich ein:
invalid_request
Für ASP.NET Core MVC ist dasDokumentatio hat
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationScheme = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
AuthenticationScheme = "oidc",
SignInScheme = "Cookies",
Authority = "http://localhost:5000",
RequireHttpsMetadata = false,
ClientId = "mvc",
SaveTokens = true
});
Ich füge das folgende NuGet-Paket in mein Projekt Microsoft.Owin.Security.OpenIdConnect ein. Mein Code lautet wie folgt:
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies"
});
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
AuthenticationType = "oidc",
SignInAsAuthenticationType = "Cookies",
Authority = "http://localhost:5000",
ClientId = "mvc",
});
Wie würde man sich richtig damit verbinden?