blob: 0cfa42212ce481d76bc6772e36f4b26d2fdd0b28 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.BL.Entities;
using Tango.BL.Enumerations;
using Tango.FSE.BL;
using Tango.MachineService.Gateway;
namespace Tango.FSE.Common.Authentication
{
/// <summary>
/// Represents the user authentication provider responsible for the current logged-in user.
/// </summary>
public interface IAuthenticationProvider : IAuthenticationService
{
/// <summary>
/// Occurs when the current logged-in user has changed.
/// </summary>
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>
/// <param name="environment">The environment.</param>
/// <returns></returns>
Task<AuthenticationResult> Login(String email, String password, EnvironmentConfiguration environment, Action<String> onStatusChanged = null);
/// <summary>
/// Changes the specified user password.
/// </summary>
/// <param name="email">The email.</param>
/// <param name="oldPassword">The old password.</param>
/// <param name="newPassword">The new password.</param>
/// <returns></returns>
Task ChangePassword(String email, String oldPassword, String newPassword);
/// <summary>
/// Logs-out the current logged-in user.
/// </summary>
void LogOut();
}
}
|