diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-15 14:16:26 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-15 14:16:26 +0300 |
| commit | de5700549a5fe01862f71d452f2abe4a74996605 (patch) | |
| tree | d64cd490c7012ea96299ea891d5d7013a822e347 /Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication | |
| parent | c6b01f3e683b83fb0d6bf080efbd24a9a732b9f5 (diff) | |
| download | Tango-de5700549a5fe01862f71d452f2abe4a74996605.tar.gz Tango-de5700549a5fe01862f71d452f2abe4a74996605.zip | |
Implemented PPC twine animated gif.
Sign out.
Implemented TangoInject attribute 'When Available' mode!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Authentication/DefaultAuthenticationProvider.cs | 13 |
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); } } } |
