1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using HeuristicLab.Services.Authentication.DataTransfer;
|
---|
4 | using System.ServiceModel;
|
---|
5 | using System.Net.Security;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Services.Authentication
|
---|
8 | {
|
---|
9 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
10 | public interface IAuthenticationService
|
---|
11 | {
|
---|
12 | #region User
|
---|
13 |
|
---|
14 | [OperationContract]
|
---|
15 | User GetUser(Guid id);
|
---|
16 |
|
---|
17 | [OperationContract]
|
---|
18 | IEnumerable<User> GetAllUsers();
|
---|
19 |
|
---|
20 | [OperationContract]
|
---|
21 | IEnumerable<User> GetUsers(Guid applicationId);
|
---|
22 |
|
---|
23 | [OperationContract]
|
---|
24 | Guid AddUser(User user);
|
---|
25 |
|
---|
26 | [OperationContract]
|
---|
27 | bool DeleteUser(Guid id);
|
---|
28 |
|
---|
29 | [OperationContract]
|
---|
30 | bool UpdateUser(User user);
|
---|
31 |
|
---|
32 | [OperationContract]
|
---|
33 | bool AddUserToRole(Guid roleId, Guid userId);
|
---|
34 |
|
---|
35 | [OperationContract]
|
---|
36 | IEnumerable<Guid> GetUsersInRole(Guid roleId);
|
---|
37 |
|
---|
38 | //[OperationContract]
|
---|
39 | //IEnumerable<User> GetUsersInRole(Guid roleId); // return = Guid
|
---|
40 |
|
---|
41 | [OperationContract]
|
---|
42 | bool RemoveUserFromRole(Guid roleId, Guid userId);
|
---|
43 |
|
---|
44 | [OperationContract]
|
---|
45 | bool IsUserInRole(Guid userId, Guid roleId);
|
---|
46 |
|
---|
47 | #endregion
|
---|
48 |
|
---|
49 | #region Role
|
---|
50 |
|
---|
51 | [OperationContract]
|
---|
52 | Role GetRole(Guid id);
|
---|
53 |
|
---|
54 | [OperationContract]
|
---|
55 | IEnumerable<Role> GetAllRoles();
|
---|
56 |
|
---|
57 | [OperationContract]
|
---|
58 | IEnumerable<Role> GetRoles(Guid applicationId);
|
---|
59 |
|
---|
60 | [OperationContract]
|
---|
61 | Guid AddRole(Role role);
|
---|
62 |
|
---|
63 | [OperationContract]
|
---|
64 | bool UpdateRole(Role role);
|
---|
65 |
|
---|
66 | [OperationContract]
|
---|
67 | bool DeleteRole(Guid id);
|
---|
68 |
|
---|
69 |
|
---|
70 | [OperationContract]
|
---|
71 | IEnumerable<Guid> GetRolesForUser(Guid userId);
|
---|
72 |
|
---|
73 |
|
---|
74 | //[OperationContract]
|
---|
75 | //IEnumerable<Role> GetRolesForUser(Guid userId); // returnvalue = GUID
|
---|
76 |
|
---|
77 | #endregion
|
---|
78 |
|
---|
79 | #region Application
|
---|
80 |
|
---|
81 | [OperationContract]
|
---|
82 | Application GetApplication(Guid id);
|
---|
83 |
|
---|
84 | [OperationContract]
|
---|
85 | Guid AddApplication(Application application); // ADD
|
---|
86 |
|
---|
87 | [OperationContract]
|
---|
88 | bool DeleteApplication(Guid id);
|
---|
89 |
|
---|
90 | [OperationContract]
|
---|
91 | IEnumerable<DataTransfer.Application> GetApplications();
|
---|
92 |
|
---|
93 |
|
---|
94 | [OperationContract]
|
---|
95 | bool UpdateApplication(Application application);
|
---|
96 |
|
---|
97 | #endregion
|
---|
98 |
|
---|
99 |
|
---|
100 | }
|
---|
101 | }
|
---|