From de5700549a5fe01862f71d452f2abe4a74996605 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 15 Jul 2018 14:16:26 +0300 Subject: Implemented PPC twine animated gif. Sign out. Implemented TangoInject attribute 'When Available' mode! --- .../Authentication/DefaultAuthenticationProvider.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (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 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 /// public class DefaultAuthenticationProvider : ExtendedObject, IAuthenticationProvider { + [TangoInject(TangoInjectMode.WhenAvailable)] + private INavigationManager _navigation; + /// /// Occurs when the current logged-in user has changed. /// @@ -36,6 +41,11 @@ namespace Tango.PPC.UI.Authentication } } + public DefaultAuthenticationProvider() + { + + } + /// /// Performs a user login by the specified email and password. /// @@ -53,10 +63,11 @@ namespace Tango.PPC.UI.Authentication /// /// Logs-out the current logged-in user. /// - public void Logout() + public void LogOut() { CurrentUser = null; CurrentUserChanged?.Invoke(this, CurrentUser); + _navigation.NavigateTo(NavigationView.LoginView); } } } -- cgit v1.3.1