找不到IdentityServer4的DiscoveryClient

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

[尝试访问发现客户端以访问其他端点,然后执行以下操作,http://docs.identityserver.io/en/aspnetcore1/endpoints/discovery.html

在.Net 7.5 MVC应用程序中安装了IdentityModel nuget软件包。但找不到DiscoveryClient

var discoveryClient = new DiscoveryClient("https://demo.identityserver.io");
var doc = await discoveryClient.GetAsync();

IdentitymodelIdentityServer4是否有变化

而且,也找不到“ Tokenclient”的参数。

asp.net-mvc identityserver4 identityserver3 identitymodel
1个回答
0
投票

能够弄清楚,在IdentityModel中进行更改,其全部扩展为HttpClient

https://identitymodel.readthedocs.io/en/latest/client/discovery.html

var client = new HttpClient();

var disco = await client.GetDiscoveryDocumentAsync("https://demo.identityserver.io");
© www.soinside.com 2019 - 2024. All rights reserved.