Missing ClaimsPrincipal in ViewComponents

I was creating a couple of ViewComponents this evening in aspnet core and needed access to the ClaimsPrincipal of the current logged in user. Like the MVC Controller I was expecting the User property of the base class to be a ClaimsPrincipal however I was wrong and it was only a IPrincipal. Was this a bug? Had I missed something? Did I really need to cast User to being a ClaimsPrincipal?...

January 18, 2018 · 1 min