aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-05-27 19:33:15 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-05-27 19:33:15 +0300
commite571f20e27c4fca6bb6efe03d6427a1f332f9830 (patch)
treeb16041b76ea3b4e8368039c9396f9bbf9624dcc2 /Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication
parent157e0685abb2e7b22b6584cdc7d6f5838ed0a808 (diff)
downloadTango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.tar.gz
Tango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.zip
Working on panel pc.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs32
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs38
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();
+ }
+}