aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-06-24 00:27:33 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-06-24 00:27:33 +0300
commitc6b1a719bac638a647dc2e4af51ad888c9f5039d (patch)
treeccc1427e68ed3f66ad1de01c173afa6ef6ae1f64 /Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
parent55c624cfa11e1c7998e5d3de0721aeee0814ce33 (diff)
downloadTango-c6b1a719bac638a647dc2e4af51ad888c9f5039d.tar.gz
Tango-c6b1a719bac638a647dc2e4af51ad888c9f5039d.zip
Implemented password hashing !
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
index e78eef13d..a259e303a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -44,7 +44,8 @@ namespace Tango.PPC.UI.Authentication
/// <returns></returns>
public User Login(string email, string password)
{
- CurrentUser = ObservablesEntitiesAdapter.Instance.Users.SingleOrDefault(x => x.Email.ToLower() == email && x.Password == password);
+ String hash = User.GetPasswordHash(password);
+ CurrentUser = ObservablesEntitiesAdapter.Instance.Users.SingleOrDefault(x => x.Email.ToLower() == email && x.Password == hash);
CurrentUserChanged?.Invoke(this, CurrentUser);
return CurrentUser;
}