This project has moved and is read-only. For the latest updates, please go here.

CookieAuthentication wraps any replaced ClaimsIdentity

Jul 29, 2014 at 11: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?
Jul 29, 2014 at 1:37 PM
That's unlikely to change. What are you trying to accomplish with the custom identity?
Aug 1, 2014 at 12:35 AM
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.