我想使用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",
});
}