Ich bin neu bei IdentityServer3 und fange gerade an, es einzurichten. Es scheint ziemlich gut zu laufen und ich habe an dem Hybrid-Flow für eine MVC-App gearbeitet, ähnlich der in Pluralsight-Kurs von Kevin Dockx (http://www.pluralsight.com/courses/building-securing-restful-api-aspdotnet) , als ich versuchte, IdentityServer mit MVC-Fehler zu konfigurieren, erscheint Microsoft.IdentityModel.Protocols.OpenIdConnectProtocolException: invalid_request
IdentityServer3 mit ServiceStack und MVC Client
ID Server:
new Client
{
Enabled = true,
ClientName = "MVC Client (Hybrid Flow)",
ClientId = "mvc",
Flow = Flows.Hybrid,
RequireConsent = true,
RedirectUris = new List<string>
{"https://localhost:44358/"},
}
var scopes = new List<Scope>{
StandardScopes.OpenId,
StandardScopes.Profile
};
und die folgende ist der Code aus dem MVC-Client App
public void Configuration(IAppBuilder app)
{
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = "Cookies",
//CookieName = "ourcookiename"
});
var options = new OpenIdConnectAuthenticationOptions
{
ClientId = "mvc",
Authority = "https://localhost:44367/identity/",
RedirectUri = "https://localhost:44358/",
// PostLogoutRedirectUri = "https://localhost:44300/",
SignInAsAuthenticationType = "Cookies",
ResponseType = "code id_token token",
Scope = "openId profile"
};
app.UseOpenIdConnectAuthentication(options);
}
Und auch IdentityServer3
mit 012 konfigurierenhttps://github.com/MacLeanElectrical/servicestack-authentication-identityserver `zur Authentifizierung des Dienstes, aber in Global.aspx für neue AppHost(). Init(); es zeigt fehler-
'System.NullReferenceException' occurred in ServiceStack.dll but was not handled in user code
Sie müssen sich auf die Protokollierung einzuschalten – leastprivilege