blob: dbef33aae0097a8cc7f8b70dccbcea26290605e0 (
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
|
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.MachineService.Gateway;
namespace Tango.FSE.BL
{
/// <summary>
/// Represents an simple authentication service that reports a global "CurrentUser".
/// </summary>
public interface IAuthenticationService
{
/// <summary>
/// Gets the current environment configuration.
/// </summary>
EnvironmentConfiguration CurrentEnvironment { get; }
/// <summary>
/// Gets the global current user.
/// </summary>
User CurrentUser { get; }
/// <summary>
/// Throws an exception if the current user does not have the specified permission.
/// </summary>
/// <param name="permission">The permission.</param>
/// <param name="message">Optional message.</param>
void ThrowIfNoPermission(Permissions permission, String message = null);
}
}
|