gpt4 book ai didi

asp.net - 获取DiscoveryClient失败,并显示“发行人名称与权限不匹配”

转载 作者:行者123 更新时间:2023-12-03 21:43:32 25 4
gpt4 key购买 nike

使用IdentityModel的DiscoveryClient执行GET时,出现以下错误:

var discoveryResponse = await DiscoveryClient.GetAsync("https://localhost/IdentityServer");



发行者名称与权限不匹配: https://localhost/identityserver


目标URL是在启用了IdentityServer4的IIS上运行的ASP.NET Core Web应用程序。客户端应用程序是在同一台计算机上运行的经典ASP.NET Web应用程序。

显然,如 discoveryResponse.Raw的内容所示,GET确实设法从IdentityServer检索值:

{
"issuer": "https://localhost/identityserver",
"jwks_uri": "https://localhost/IdentityServer/.well-known/openid-configuration/jwks",
"authorization_endpoint": "https://localhost/IdentityServer/connect/authorize",
"token_endpoint": "https://localhost/IdentityServer/connect/token",
"userinfo_endpoint": "https://localhost/IdentityServer/connect/userinfo",
"end_session_endpoint": "https://localhost/IdentityServer/connect/endsession",
"check_session_iframe": "https://localhost/IdentityServer/connect/checksession",
"revocation_endpoint": "https://localhost/IdentityServer/connect/revocation",
"introspection_endpoint": "https://localhost/IdentityServer/connect/introspect",
"frontchannel_logout_supported": true,
"frontchannel_logout_session_supported": true,
"scopes_supported": [ "CustomIdentityResources", "profile", "openid", "MyAPI.full_access", "offline_access" ],
"claims_supported": [],
"grant_types_supported": [ "authorization_code", "client_credentials", "refresh_token", "implicit" ],
"response_types_supported": [ "code", "token", "id_token", "id_token token", "code id_token", "code token", "code id_token token" ],
"response_modes_supported": [ "form_post", "query", "fragment" ],
"token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ],
"subject_types_supported": [ "public" ],
"id_token_signing_alg_values_supported": [ "RS256" ],
"code_challenge_methods_supported": [ "plain", "S256" ]
}

最佳答案

权限:https://localhost/IdentityServer
发行人:https://localhost/identityserver

它们不匹配-区分大小写。

关于asp.net - 获取DiscoveryClient失败,并显示“发行人名称与权限不匹配”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43626944/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com