可以在*https://baseaddress/.well-known/openid-configuration*找到发现文档。它包含有关identityserver的端点,密钥材料和功能的信息。
默认情况下,所有信息都包含在发现文档中,但通过使用配置选项,您可以隐藏各个部分,例如:
services.addidentityserver(options => { options.discovery.showidentityscopes = false; options.discovery.showapiscopes = false; options.discovery.showclaims = false; options.discovery.showextensiongranttypes = false; });
42.1扩展发现
您可以向发现文档添加自定义条目,例如:
services.addidentityserver(options => { options.discovery.customentries.add("my_setting", "foo"); options.discovery.customentries.add("my_complex_setting", new { foo = "foo", bar = "bar" }); });
当您添加以~开头的自定义值时,它将扩展到identityserver基址以下的绝对路径,例如:
options.discovery.customentries.add("my_custom_endpoint", "~/custom");
如果要完全控制发现(和jwks)文档的呈现,可以实现`idiscoveryresponsegenerator 接口(或从我们的默认实现派生)。
github地址
黄山市民网:https://www.huangshanshimin.com/