JwtSecurityTokenHandler.DefaultMapInboundClaims = false; //默认true,会将claimType替换为长的,符合 rfc7519中定义的claim名字,false 将使用短名字,例如:name
JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear(); // 禁用入站claims类型映射
请注意,你需要将DefaultInboundClaimTypeMap.Clear()放在services.AddAuthentication(...)之前,才能够确保映射被正确地禁用。
本文链接:https://blog.nnwk.net/article/57
有问题请留言。版权所有,转载请在显眼位置处保留文章出处,并留下原文连接
Leave your question and I'll get back to you as soon as I see it. All rights reserved. Please keep the source and links
友情链接:
子卿全栈
全部评论