aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-01-14 15:49:39 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-01-14 15:49:39 +0200
commit48071f784b19ea8ed2859fb03642b8cc856406b1 (patch)
tree2a3152e7188da7c184005e3bff0c7171b7ecfaf2 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
parenta20fd4bd769aeccd1fd1f20273f895c92a5b5bb8 (diff)
downloadTango-48071f784b19ea8ed2859fb03642b8cc856406b1.tar.gz
Tango-48071f784b19ea8ed2859fb03642b8cc856406b1.zip
Added code comments for:
MachineStudio.UI
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs22
1 files changed, 21 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index a30cf0f92..80e5e9762 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -10,10 +10,17 @@ using Tango.MachineStudio.Common.Authentication;
namespace Tango.MachineStudio.UI.Authentication
{
+ /// <summary>
+ /// Represents the default Machine Studio <see cref="IAuthenticationProvider">Authentication provider</see>
+ /// </summary>
+ /// <seealso cref="Tango.Core.ExtendedObject" />
+ /// <seealso cref="Tango.MachineStudio.Common.Authentication.IAuthenticationProvider" />
public class DefaultAuthenticationProvider : ExtendedObject, IAuthenticationProvider
{
private User _currentUser;
-
+ /// <summary>
+ /// Gets the current logged-in user.
+ /// </summary>
public User CurrentUser
{
get { return _currentUser; }
@@ -25,8 +32,18 @@ namespace Tango.MachineStudio.UI.Authentication
}
}
+ /// <summary>
+ /// Occurs when the current logged-in user has changed.
+ /// </summary>
public event EventHandler<User> CurrentUserChanged;
+ /// <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>
+ /// <exception cref="AuthenticationException">Login failed for user " + email</exception>
public User Login(string email, string password)
{
User user = ObservablesEntitiesAdapter.Instance.Users.SingleOrDefault(x => x.Email.ToLower() == email.ToLower() && x.Password == password);
@@ -40,6 +57,9 @@ namespace Tango.MachineStudio.UI.Authentication
return user;
}
+ /// <summary>
+ /// Logs-out the current logged-in user.
+ /// </summary>
public void Logout()
{
CurrentUser = null;