diff options
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.cs | 7 |
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}..."); |
