1

クライアントをidentityServerに接続しようとすると、サーバーログに次のメッセージが表示されます:

  • [エラー] 「不明なクライアントまたは有効になっていません: cliente1」*

これは私の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",
        });
    }

これは私のidentityServerクライアント構成です:

               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
            },

何が問題なのですか?前もって感謝します

4

1 に答える 1