Thursday, April 22, 2010

IIdentity, IPrincipal whats the difference?

IIdentity represents the user.

IPrincipal represents the user along with all his role memberships.

This is why IPrincipal has a reference to the IIdentity object that it encapsulates. In addition it also have methods to determine role membership.

No comments:

Post a Comment

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.