From e571f20e27c4fca6bb6efe03d6427a1f332f9830 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 27 May 2018 19:33:15 +0300 Subject: Working on panel pc. --- .../DefaultAuthenticationProvider.cs | 32 ++++++++++++++++++ .../Authentication/IAuthenticationProvider.cs | 38 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs new file mode 100644 index 000000000..c8e89ac2f --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.PPC.Common.Authentication +{ + public class DefaultAuthenticationProvider : IAuthenticationProvider + { + public User CurrentUser + { + get + { + throw new NotImplementedException(); + } + } + + public event EventHandler CurrentUserChanged; + + public User Login(string email, string password) + { + throw new NotImplementedException(); + } + + public void Logout() + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs new file mode 100644 index 000000000..0892932a8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.PPC.Common.Authentication +{ + /// + /// Represents the Machine Studio user authentication provider responsible for the current logged-in user. + /// + public interface IAuthenticationProvider + { + /// + /// Occurs when the current logged-in user has changed. + /// + event EventHandler CurrentUserChanged; + + /// + /// Gets the current logged-in user. + /// + User CurrentUser { get; } + + /// + /// Performs a user login by the specified email and password. + /// + /// The email. + /// The password. + /// + User Login(String email, String password); + + /// + /// Logs-out the current logged-in user. + /// + void Logout(); + } +} -- cgit v1.3.1