New Posts New Posts RSS Feed: Principal vs Identity
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Principal vs Identity

 Post Reply Post Reply
Author
smi-mark View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 24-Feb-2009
Location: Dallas, Texas
Posts: 343
Post Options Post Options   Quote smi-mark Quote  Post ReplyReply Direct Link To This Post Topic: Principal vs Identity
    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?


Back to Top
DenisK View Drop Down
IdeaBlade
IdeaBlade


Joined: 25-Aug-2010
Posts: 715
Post Options Post Options   Quote DenisK Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down