From 10a9435c7fece43c588addb744952d92596a8f5b Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 26 Nov 2018 13:37:11 +0200 Subject: Implemented single user mode on PPC. --- .../Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs') 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 /// /// The email. /// The password. + /// Determines whether to encrypt the provided password before attempting to login /// - public Task Login(string email, string password) + public Task Login(string email, string password, bool encrypt = true) { - return Task.Factory.StartNew(() => + return Task.Factory.StartNew(() => { - String hash = User.GetPasswordHash(password); + String hash = encrypt ? User.GetPasswordHash(password) : password; LogManager.Log($"Logging in user {email}..."); -- cgit v1.3.1