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 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; } /// /// Gets a value indicating whether the authentication provider is using a null user. /// bool AuthenticationRequired { get; } /// /// Performs a user login by the specified email and password. /// /// The email. /// The password. /// Determines whether to encrypt the provided password before attempting to login /// Task Login(String email, String password, bool encrypt = true); /// /// Performs a fake login when no authentication is used. /// /// Task Login(); /// /// Logs-out the current logged-in user. /// void LogOut(); } }