根据验证程序使用UseOpenIdConnectAuthentication,远程证书无效

时间:2019-03-28 04:34:10

标签: asp.net asp.net-mvc

我想使用UseOpenIdConnectAuthentication,但是我的代码无法正常工作, 错误“根据验证过程,远程证书无效。”

  public void ConfigureAuth(IAppBuilder app)
        {

            app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType);

            app.UseCookieAuthentication(new CookieAuthenticationOptions());


            JwtSecurityTokenHandler.DefaultInboundClaimTypeMap = new Dictionary<string, string>();

            app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationType = "Cookies"
            });

            app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
            { 
                ClientId = "ro.client",
                Authority = "https://server:8084/Account/Login",
                RedirectUri = "https://server:8084/",
                ResponseType = "id_token",
                Scope = "openid email",

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

error image

0 个答案:

没有答案