与AzureAD相比,ADFS openid-configuration JSON元数据被编码

问题描述 投票:0回答:1

当我访问ADFS的openid配置元数据时,我注意到返回的JSON文档是编码的,例如,所有“/”字符都被“\”转义。当我访问AzureAD的元数据时,我没有看到这种行为。尝试使用ConfigurationManager获取元数据时,这会导致问题:

ConfigurationManager<OpenIdConnectConfiguration> configManager = 
new ConfigurationManager<OpenIdConnectConfiguration>(stsDiscoveryEndpoint);
OpenIdConnectConfiguration config = configManager.GetConfigurationAsync().Result;

“发行人”: “https://login.xxxxxx.com/adfs”

网址:https://login.xxxxxx.com/adfs/.well-known/openid-configuration

asp.net azure-active-directory adfs openid-connect
1个回答
0
投票

原来这个问题与JSON文件中的任何转义无关。该错误是由提取文档的异步操作引起的。

错误是:IDX10803:无法创建以从''https://login.dometic.com/adfs/.well-known/openid-configuration'获取配置。

当我改变时,错误就消失了

configManager.GetConfigurationAsync().Result 

至 :

await configManager.GetConfigurationAsync().
© www.soinside.com 2019 - 2024. All rights reserved.