diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication')
2 files changed, 70 insertions, 0 deletions
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<User> 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 +{ + /// <summary> + /// Represents the Machine Studio user authentication provider responsible for the current logged-in user. + /// </summary> + public interface IAuthenticationProvider + { + /// <summary> + /// Occurs when the current logged-in user has changed. + /// </summary> + event EventHandler<User> CurrentUserChanged; + + /// <summary> + /// Gets the current logged-in user. + /// </summary> + User CurrentUser { get; } + + /// <summary> + /// Performs a user login by the specified email and password. + /// </summary> + /// <param name="email">The email.</param> + /// <param name="password">The password.</param> + /// <returns></returns> + User Login(String email, String password); + + /// <summary> + /// Logs-out the current logged-in user. + /// </summary> + void Logout(); + } +} |
