c# - Selectively Serialize and Deserialize -
i have user object in linq-to-sql mapping. there password attribute on want deserialize when submitted user--for example, during login. never want pass attribute user, though, since contain encrypted version of actual password , i'd rather not expose information password or encryption method. there way object-wide tell linq-to-sql never pass password attribute when returning user object?
i use https encryption, because in accessing service, default enforce encryption, saves on client side code. have few possible answers though:
- blank out password when return user object wcf side. (you can change value of password of object, , not save change.. return object client )
- use custom object login response returns necessary information client.
- implement data transfer object pattern, nuget package automapper.
if aren't salting , hashing passwords, please please please consider it.
Comments
Post a Comment