无法建立SSL连接。根据验证步骤,远程证书无效

时间:2019-05-10 09:27:13

标签: c# asp.net-core jwt identityserver4

我正在尝试通过使用邮递员发送请求来验证JWT令牌,但是我遇到了SSL问题。我已经在Identity Server 4配置中禁用RequireHttps。

我正在使用IdentityServer4和ASP.Net Core 2

services.AddAuthentication(IdentityServerAuthenticationDefaults.AuthenticationScheme)
                .AddIdentityServerAuthentication(options =>
                {
                    options.Authority = "http://localhost:5000";
                    options.SupportedTokens = SupportedTokens.Jwt;
                    options.RequireHttpsMetadata = false;
                    options.ApiName = "api_name";
                });

这是我得到的错误:

An unhandled exception has occurred while executing the request.
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'http://localhost:5000/.well-known/openid-configuration'. ---> 
System.IO.IOException: IDX20804: Unable to retrieve document from: 'http://localhost:5000/.well-known/openid-configuration'. ---> 
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception. ---> 
System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

0 个答案:

没有答案