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 | User GetUser(Guid applicationId, string userName);
|
---|
19 |
|
---|
20 | [OperationContract]
|
---|
21 | IEnumerable<User> GetUsers(Guid applicationId);
|
---|
22 |
|
---|
23 | [OperationContract]
|
---|
24 | bool InsertUser(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 | bool RemoveUserFromRole(Guid roleId, Guid userId);
|
---|
37 |
|
---|
38 | [OperationContract]
|
---|
39 | IEnumerable<Role> GetRolesForUser(Guid userId);
|
---|
40 |
|
---|
41 | #endregion
|
---|
42 |
|
---|
43 | #region Role
|
---|
44 |
|
---|
45 | [OperationContract]
|
---|
46 | Role GetRole(Guid id);
|
---|
47 |
|
---|
48 | [OperationContract]
|
---|
49 | Role GetRole(Guid applicationId, string roleName);
|
---|
50 |
|
---|
51 | [OperationContract]
|
---|
52 | IEnumerable<Role> GetRoles(Guid applicationId);
|
---|
53 |
|
---|
54 | [OperationContract]
|
---|
55 | bool RoleExists(Guid roleId);
|
---|
56 |
|
---|
57 | [OperationContract]
|
---|
58 | bool IsUserInRole(Guid roleId, Guid userId);
|
---|
59 |
|
---|
60 | [OperationContract]
|
---|
61 | bool InsertRole(Role role);
|
---|
62 |
|
---|
63 | [OperationContract]
|
---|
64 | bool UpdateRole(Role role);
|
---|
65 |
|
---|
66 | [OperationContract]
|
---|
67 | bool DeleteRole(Guid id);
|
---|
68 |
|
---|
69 | [OperationContract]
|
---|
70 | IEnumerable<User> GetUsersInRole(Guid roleId);
|
---|
71 |
|
---|
72 | #endregion
|
---|
73 |
|
---|
74 | #region Application
|
---|
75 |
|
---|
76 | [OperationContract]
|
---|
77 | Application GetApplication(Guid id);
|
---|
78 |
|
---|
79 | [OperationContract]
|
---|
80 | Application InsertApplication(Application application);
|
---|
81 |
|
---|
82 | [OperationContract]
|
---|
83 | bool DeleteApplication(Application application);
|
---|
84 | #endregion
|
---|
85 |
|
---|
86 | #region Membership
|
---|
87 |
|
---|
88 | [OperationContract]
|
---|
89 | Membership InsertMembership(Membership membership);
|
---|
90 |
|
---|
91 | #endregion
|
---|
92 | }
|
---|
93 | }
|
---|