aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
diff options
context:
space:
mode:
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.cs13
1 files changed, 12 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 a259e303a..7196c9743 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -6,7 +6,9 @@ using System.Threading.Tasks;
using Tango.BL;
using Tango.BL.Entities;
using Tango.Core;
+using Tango.Core.DI;
using Tango.PPC.Common.Authentication;
+using Tango.PPC.Common.Navigation;
namespace Tango.PPC.UI.Authentication
{
@@ -17,6 +19,9 @@ namespace Tango.PPC.UI.Authentication
/// <seealso cref="Tango.PPC.Common.Authentication.IAuthenticationProvider" />
public class DefaultAuthenticationProvider : ExtendedObject, IAuthenticationProvider
{
+ [TangoInject(TangoInjectMode.WhenAvailable)]
+ private INavigationManager _navigation;
+
/// <summary>
/// Occurs when the current logged-in user has changed.
/// </summary>
@@ -36,6 +41,11 @@ namespace Tango.PPC.UI.Authentication
}
}
+ public DefaultAuthenticationProvider()
+ {
+
+ }
+
/// <summary>
/// Performs a user login by the specified email and password.
/// </summary>
@@ -53,10 +63,11 @@ namespace Tango.PPC.UI.Authentication
/// <summary>
/// Logs-out the current logged-in user.
/// </summary>
- public void Logout()
+ public void LogOut()
{
CurrentUser = null;
CurrentUserChanged?.Invoke(this, CurrentUser);
+ _navigation.NavigateTo(NavigationView.LoginView);
}
}
}