【发布时间】:2018-09-05 09:56:33
【问题描述】:
我正在为当前项目请求针对身份服务器应用程序的令牌,我们在之前的项目中使用了该令牌。在我的本地机器上,所以是 localhost 级别。
令牌请求有效:
IdentityServer3.Core.ResponseHandling.TokenResponseGeneratorCreating token response
IdentityServer3.Core.ResponseHandling.TokenResponseGeneratorProcessing token request
Identity.Api.Monitoring.IdentityEventServiceInformation - 2020 - Refresh token issued - - IdentityServer3.Core.Events.RefreshTokenDetails
Identity.Api.Monitoring.IdentityEventServiceInformation - 2000 - Access token issued - - IdentityServer3.Core.Events.AccessTokenIssuedDetails
Identity.Api.Monitoring.IdentityEventServiceSuccess - 3000 - Endpoint success - - IdentityServer3.Core.Events.EndpointDetail
IdentityServer3.Core.Endpoints.TokenEndpointControllerEnd token request
IdentityServer3.Core.Results.TokenResultReturning token response.
我收到以下回复:
{
"access_token": "myaccesstoken",
"expires_in": 86400,
"token_type": "Bearer",
"refresh_token": "myrefreshtoken"
}
现在,如果我在请求中使用该令牌,我会收到 401 unauthorized 响应:
从表面上看,我希望这个调用能奏效,因为我传递了一个正确的 令牌。那么,我该怎么做才能弄清楚为什么它不起作用?
【问题讨论】:
标签: c# .net oauth-2.0 identityserver3