我正在使用Identity Server 4,尝试使用introspection端点,但仅凭文档我无法理解。
文档只给出了这个示例。
POST /connect/introspect
Authorization: Basic xxxyyy
token=<token>
现在,为什么会有基本身份验证,xxxyyy应该是什么?我的应用程序中没有设置基本身份验证。我只是按照以下步骤使用ASP.NET Core设置了Identity Server 4的ConfigureServices
:
services.AddIdentityServer()
.AddTemporarySigningCredential()
.AddInMemoryApiResources(ApiResourceProvider.GetAllResources())
.AddAspNetIdentity<Usuario>();
并在配置
中
app.UseIdentity();
app.UseIdentityServer();
我现在尝试使用一个POST请求到/connect/introspect,请求body中只包含token=<token>
,但是返回了404错误。
我觉得我还是没有理解。
在ASP.NET Core中,我们如何使用Identity Server 4的introspection端点?