Print Page | Close Window

Principal vs Identity

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3097
Printed Date: 13-May-2026 at 9:42pm


Topic: Principal vs Identity
Posted By: smi-mark
Subject: Principal vs Identity
Date Posted: 16-Nov-2011 at 1:33pm
I'm working on the login portion of our application at the moment, and I am wondering where the best place to put custom properties is?

We have a User object that stores all the details, but I don't want to pass all of that back to the client. I would like to pass back such properties as UserId, Username, Full Name, Email, etc.

Should these properties be put on the identity, or the principal? Should I just have my own custom IPrincipal class with a default UserIdentity?





Replies:
Posted By: DenisK
Date Posted: 29-Nov-2011 at 4:52pm
Hi smi-mark;

Sorry for the delayed reply. Our suggestion is to put it on a custom IPrincipal with or without a custom UserIdentity.



Print Page | Close Window