更新时间:2023-02-16 14:58:31
您可以使用此方法:
var email = User.FindFirst("sub")?.Value;
就我而言,我使用电子邮件作为唯一值
In my case I'm using the email as a unique value
如何在 aspnet.core web api 中验证 JWT 令牌?
如何在 .NET Core Web API 中获取当前用户(来自 JWT 令牌)
如何在aspnet.core Web API中验证JWT令牌?
在 .net core web api 中存储 JWT 令牌的位置?
如何在.NET Core Web API中获取当前用户(来自JWT令牌)
如何在 Asp.net Core Web Api 中默认使用 Newtonsoft.Json?
如何在ASP.NET Core Web API中绑定Json查询字符串
如何在asp.net core web api中绑定Json Query字符串
如何在 .Net Core Web API 中停止自引用循环?
如何在 .NET Core Web API 中配置并发?