aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 13:37:11 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-26 13:37:11 +0200
commit10a9435c7fece43c588addb744952d92596a8f5b (patch)
treef3a05a18a437b64f8876cf193497eaa054d7dc57 /Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
parent0821e00982f13f234c4e83def85b2d49a5fed9b8 (diff)
downloadTango-10a9435c7fece43c588addb744952d92596a8f5b.tar.gz
Tango-10a9435c7fece43c588addb744952d92596a8f5b.zip
Implemented single user mode on PPC.
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.cs7
1 files changed, 4 insertions, 3 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 23761eb9b..04e968da2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -50,12 +50,13 @@ namespace Tango.PPC.UI.Authentication
/// </summary>
/// <param name="email">The email.</param>
/// <param name="password">The password.</param>
+ /// <param name="encrypt">Determines whether to encrypt the provided password before attempting to login</param>
/// <returns></returns>
- public Task<User> Login(string email, string password)
+ public Task<User> Login(string email, string password, bool encrypt = true)
{
- return Task.Factory.StartNew<User>(() =>
+ return Task.Factory.StartNew<User>(() =>
{
- String hash = User.GetPasswordHash(password);
+ String hash = encrypt ? User.GetPasswordHash(password) : password;
LogManager.Log($"Logging in user {email}...");