I'm building my own token based authentication for asp.net web api 2 and I have a question about the user
class.
Currently my user
class implements IPrincipal
and IIdentity
, but I don't know what is the best practice. Would you divide IPrincipal
and IIdentity
and make the IIdentity
implementation a member of IPrincipal
?
Currently I use the following class declaration
class User : IPrincipal, IIdentity
Thank you!