tsunami

log in
history

IPrincipal

Luke Breuer
2007-04-20 18:06 UTC

MSDN: System.Security.IPrincipal

IPrincipal appears to be the preferred method for authorization; see Implement IPrincipal in ASP.NET 1.1 from Microsoft. The code in this article serializes role information to the authentication ticket; it is unclear as to whether this is desirable.

From 4 Guys from Rolla:
A Principal contains information about the identity and role(s) that the current user is associated with. It is through the Principal that you are able to check the role membership of the current user. In many ways a Principal is the glue that binds identities, roles, and the various other pieces of information that fully describe that Principal to the application.

Questions:
  • When does ASP.NET assign HttpContext.User with an object implemented IPrincipal? Is the MembershipProvider responsible for this assignment?