2016-04-01 6 views
0

Wenn ich versuche, meinen Klienten mit identityServer, Server Lügt nächste Nachricht zu verbinden:identityServer 3 Fehlermeldung Verbindungs ​​Client: "Unbekannter Client oder nicht aktiviert"

  • [Fehler] „Unknown-Client oder nicht aktiviert: cliente1 „*

das ist mein OpenIdConnectAuthenticationOptions:

public void Configuration(IAppBuilder app) 
    { 
     app.UseCookieAuthentication(new CookieAuthenticationOptions 
     { 
      AuthenticationType = "Cookies" 
     }); 

     app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions 
     { 
      ClientId = "cliente1", 
      Authority = "https://localhost:44333/core", 
      RedirectUri = "http://localhost:57598/", 
      ResponseType = "id_token", 
      Scope = "openid email", 

      UseTokenLifetime = false, 
      SignInAsAuthenticationType = "Cookies", 
     }); 
    } 

und das ist mein identityServer Client-Konfiguration:

   new Client{ 

       ClientName = "cliente1", 
       Enabled = true, 
       ClientId = "cliente1", 
       ClientSecrets = new List<Secret> 
       { 
        new Secret("secret".Sha256()) 
       }, 


       Flow = Flows.Implicit, 
       //RequireConsent = true, 
       //AllowRememberConsent = true, 

       RedirectUris = new List<string> { 
        "http://localhost:57598/" 
       }, 

       PostLogoutRedirectUris = new List<string>{ 
        "http://localhost:57598/" 
       }, 
       AllowedScopes = new List<string> 
       { 
        Constants.StandardScopes.OpenId, 
        Constants.StandardScopes.Email, 
        //Constants.StandardScopes.OfflineAccess, 
        //"read", 
        //"write", 
        "webapi" 
       }, 

       AccessTokenType = AccessTokenType.Reference, 

       IdentityTokenLifetime = 360, 
       AccessTokenLifetime = 360 
      }, 

Was könnte das Problem sein? Vielen Dank im Voraus

+0

Protokollierung aktiviert zuerst: https://identityserver.github.io/Documentation/docsv2/configuration/logging.html – leastprivilege

+0

Protokollierung ist in meinem Server und Dateiprotokoll nächste Nachricht aktivieren: [Fehler] „Unknown-Client oder nicht aktiviert: cliente1 "* – Sem

Antwort

1

Sie verwenden MS OpenID Connect Middleware in Ihrer ASP.NET MVC-Anwendung, die mit dem Hybrid-Flow arbeitet, aber der Flow des Clients ist auf Implizit gesetzt. Setzen Sie den Fluss auf Hybrid (Flow = Flows.Hybrid), und es sollte funktionieren.

Verwandte Themen