asp.net-core - 无法使用 keycloak 从 open-id connect 获取配置
问题描述
Keycloak 服务器在端口 8443 上运行,为了授权,我使用了包含所有信息的 JWT 令牌
https 端口给出证书错误:**System.InvalidOperationException:IDX20803:无法从以下位置获取配置:'https://localhost:8443/auth/realms/Smf-Portal/.well-known/openid-configuration'。---> System.IO.IOException:IDX20804:无法从以下位置检索文档:“https://localhost:8443/auth/realms/Smf-Portal/.well-known/openid-configuration”。---> System.Net.Http.HttpRequestException:
无法建立 SSL 连接,请参阅内部异常。** ---> System.Security.Authentication.AuthenticationException:根据验证程序,远程证书无效。
for ex :
{
"exp": 1624451309,
"iat": 1624451009,
"jti": "6dea03d9-49d7-4d0e-a81f-91cbc38fe595",
"iss": "https://default-host:8443/auth/realms/Smf-Portal",
"sub": "2c2402ad-37c5-4039-b78f-07f9e47cdc35",
"typ": "Bearer",
"azp": "timesheet-microservice",
"session_state": "43e86783-38e1-42de-a4aa-ed229887504b",
"acr": "1",
"allowed-origins": [
"https://localhost:5004"
],
"realm_access": {
"roles": [
"app-user"
]
},
"resource_access": {
"timesheet-microservice": {
"roles": [
"user"
]
}
},
"scope": "profile email",
"email_verified": true,
"preferred_username": "employee1"
}
解决方案
推荐阅读
- python - 在 Python 3.8 中修补异步对象
- sharepoint - 在 Sharepoint 页面上将列表显示为甘特图
- linux - 如何根据列比较 unix 中的两个文件
- r - 在存储在多列上的数据框中查找值
- pytorch - PyTorch get_device_capability() 输出说明
- postman - 无法通过无头 api 在撇号中发布文章
- google-apps-script - Google 工作表错误:访问带有 id 的文档时服务电子表格超时
- swift - 集合视图中单元格的宽度不正确
- oracle - 无法使用 Oracle PL/SQL 访问 Web 服务
- javascript - 查找文本并在单选按钮单击时替换它