aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs
blob: 2929ea405875b6dbdd19162ad975089648f5a6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { colo
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
{
    /// <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, LoginMethod method, bool bypassVersionCheck = false, Action<String> logAction = null);

        /// <summary>
        /// Logs-out the current logged-in user.
        /// </summary>
        void Logout();
    }
}
class="n">project(':Tango.Web') implementation project(':Tango.NativeBridge') }