I'm crafting a custom Owin Middleware to handle logging into .NET web apps using our custom token server.
I've got everything working. The token is parsed into claims for an identity, the identity is put inside of an AuthenticationTicket, and the user is successfully logged in using CookieAuthentication.
I'd like to make querying the claims easier for other developers, so I inherited from ClaimsIdentity. I create an instance of my class and pass it along to the AuthenticationTicket constructor.
My problem is that User.Identity in my controller action is not an instance of my class.
What am I missing? Is something in ASP.NET recreating my Identity instance and simply copying over all of the claims?
IPrincipal
unless I have further needs that require a custom identity.