如何解决handler.CreateJwtSecurityTokendescriptor; IDX12401
当我的服务器在本地(GTM + 1)运行时,例如当我将服务器置于-8个时区时,一切都很好。
然后我收到一条消息:
IDX12401: Expires: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]' must be after NotBefore: '[PII is hidden by default. Set the 'ShowPII' flag in IdentityModelEventSource.cs to true to reveal it.]'.
这似乎是因为
Expires = DateTime.Now.AddMinutes(30),... other code ...
JwtSecurityTokenHandler handler = new JwtSecurityTokenHandler();
JwtSecurityToken token = handler.CreateJwtSecurityToken(descriptor);
出现错误。奇怪的是,Expires字段是该区域中的当前时间+30分钟(这是配置为+30分钟的时间)。这很奇怪。为什么不允许登录并立即随该消息过期,而仅在-X时区显示,而实际上显示的时间是将来的30分钟。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。