Unable to add and fetch custom claims values

狂风中的少年 提交于 2019-12-01 02:33:25
Burak SARICA

You should add those claims on identity validation phase. Please check similar implementation here: Server side claims caching with Owin Authentication

In your account controller, to get a valid authenticationManager, you should use Request.GetOwinContext().Authentication. Im affraid System.Web.HttpContext.Current.GetOwinContext().Authentication gets you a fresh authenticationManager instead of the current Owin context one

Have you tried:

var res = identity.Claims.Where(c=>c.Type=="urn:Custom:MasterUniqueId").FirstOrDefault();

?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!