ASP.NET MVC – Set custom IIdentity or IPrincipal

Here’s how I do it. I decided to use IPrincipal instead of IIdentity because it means I don’t have to implement both IIdentity and IPrincipal. Create the interface interface ICustomPrincipal : IPrincipal { int Id { get; set; } string FirstName { get; set; } string LastName { get; set; } } CustomPrincipal public class … Read more