aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Shared/Themes/Generic.xaml
blob: 1226f66d1beb811e17eb0bbf8092503810fd4768 (plain)
1
2
3
4
5
6
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;

namespace Tango.MachineStudio.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>
        AuthenticationLoginResult Login(String email, String password);

        /// <summary>
        /// Logs-out the current logged-in user.
        /// </summary>
        void Logout();
    }
}