using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.MachineStudio.Common.Web;
namespace Tango.MachineStudio.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; }
Machine Machine { get; }
///
/// Performs a user login by the specified email and password.
///
/// The email.
/// The password.
///
AuthenticationLoginResult Login(String email, String password, LoginMethod method, bool bypassVersionCheck = false, Action logAction = null, String serialNumber = null);
///
/// Logs-out the current logged-in user.
///
void Logout();
}
}