aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs17
1 files changed, 14 insertions, 3 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index ccaedb359..9be938fb7 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -13,6 +13,8 @@ using System.Data.Entity;
using Tango.Transport.Web;
using Tango.Settings;
using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.StudioApplication;
+using Tango.Core.Helpers;
namespace Tango.MachineStudio.UI.Authentication
{
@@ -50,7 +52,7 @@ namespace Tango.MachineStudio.UI.Authentication
/// <param name="password">The password.</param>
/// <returns></returns>
/// <exception cref="AuthenticationException">Login failed for user " + email</exception>
- public User Login(string email, string password)
+ public AuthenticationLoginResult Login(string email, string password)
{
var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
@@ -61,6 +63,7 @@ namespace Tango.MachineStudio.UI.Authentication
Email = email,
Password = password,
+ Version = AssemblyHelper.GetCurrentAssemblyVersion().ToString(),
}).Result;
@@ -90,8 +93,16 @@ namespace Tango.MachineStudio.UI.Authentication
throw new AuthenticationException("Invalid credentials for " + email);
}
- CurrentUser = user;
- return user;
+ if (!response.VersionChangeRequired)
+ {
+ CurrentUser = user;
+ }
+
+ return new AuthenticationLoginResult()
+ {
+ User = user,
+ Response = response
+ };
}
}