CookieAuthentication wraps any replaced ClaimsIdentity

Jul 29, 2014 at 10:53 AM
Hi,

I'm attempting to use a custom ClaimsIdentity with the CookieAuthenticationHandler.

For other authentication types I'm wiring this into the ValidateIdentity callback (using the .Validated(newIdentity)), but the CookieValidateIdentityContext wraps any identity provided inside a new ClaimsIdentity.

Is this likely to change, or am I best to override the identity in a hook following the authentication process?
Coordinator
Jul 29, 2014 at 12:37 PM
That's unlikely to change. What are you trying to accomplish with the custom identity?
Jul 31, 2014 at 11:35 PM
Thanks,

I was looking to append custom security data etc to the Principal - a pattern I've observed in a number of apps.

As you point out, due to renewal I'll stick with the standard ClaimsPrincipal and store any required data in claims.