Endpoint的概念在IdentityServer里其实就是一些资源操做的url地址;如同Restful API里面的Endpoint是概念;html
那么能够经过你本身的受权服务端获得相对应的地址与信息:api
标准地址:http://受权服务端地址/.well-known/openid-configuration浏览器
一、Discovery Endpoin服务器
就是展现IdentityServer相关元数据、发行者名称(Issuer)、该受权服务器可以受权的全部scope;地址就是上面那个标准地址ide
固然实际操做环境中可使用代码查看和操做;咱们能够经过官方提供的IdentityModel封装的类库;url
好比前面:经过IdentityModel封装的DiscoverClient对象;向受权服务器获取DiscoveryResponse对象;其根本原理仍是发起原始的HTTP请求;spa
客户端包帮咱们把地址和标准的http帮咱们封装了;直接拿基地址就能够操做;code
DiscoveryClient dc = new DiscoveryClient("http://localhost:5000"); DiscoveryResponse disco = await dc.GetAsync(); //DiscoveryResponse disco2 = await DiscoveryClient.GetAsync("http://localhost:5000"); // request token var tokenClient = new TokenClient(disco.TokenEndpoint, "client", "secret"); var tokenResponse = await tokenClient.RequestClientCredentialsAsync("api1");
二、Authorize Endpointserver
用户经过浏览器请求token或者受权码使用这个url;Authorize Endpoint内部包括用户身份认证、用户容许受权htm
三、Token Endpoint
文档:
https://identityserver4.readthedocs.io/en/release/endpoints/userinfo.html