1 | #region License Information
|
---|
2 | /* HeuristicLab
|
---|
3 | * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
4 | *
|
---|
5 | * This file is part of HeuristicLab.
|
---|
6 | *
|
---|
7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
8 | * it under the terms of the GNU General Public License as published by
|
---|
9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
10 | * (at your option) any later version.
|
---|
11 | *
|
---|
12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
15 | * GNU General Public License for more details.
|
---|
16 | *
|
---|
17 | * You should have received a copy of the GNU General Public License
|
---|
18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
19 | */
|
---|
20 | #endregion
|
---|
21 |
|
---|
22 | using System.Collections.Generic;
|
---|
23 | using System.Net.Security;
|
---|
24 | using System.ServiceModel;
|
---|
25 | using HeuristicLab.Services.UserManagement.DataTransfer;
|
---|
26 |
|
---|
27 | namespace HeuristicLab.Services.UserManagement {
|
---|
28 | [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
|
---|
29 | public interface IUserManagementService {
|
---|
30 |
|
---|
31 | #region User
|
---|
32 | [OperationContract]
|
---|
33 | IEnumerable<User> GetUsers(Application application);
|
---|
34 |
|
---|
35 | [OperationContract]
|
---|
36 | User AddUser(User user);
|
---|
37 |
|
---|
38 | [OperationContract]
|
---|
39 | void DeleteUser(User user);
|
---|
40 |
|
---|
41 | [OperationContract]
|
---|
42 | void UpdateUser(User user);
|
---|
43 |
|
---|
44 | [OperationContract]
|
---|
45 | void AddUserToRole(Role role, User user);
|
---|
46 |
|
---|
47 | [OperationContract]
|
---|
48 | void RemoveUserFromRole(Role role, User user);
|
---|
49 |
|
---|
50 | [OperationContract]
|
---|
51 | bool IsUserInRole(User user, Role role);
|
---|
52 |
|
---|
53 | [OperationContract]
|
---|
54 | User ResetPassword(string applicationName, string userName, string password);
|
---|
55 | #endregion
|
---|
56 |
|
---|
57 | #region Role
|
---|
58 | [OperationContract]
|
---|
59 | IEnumerable<Role> GetRoles(Application application);
|
---|
60 |
|
---|
61 | [OperationContract]
|
---|
62 | Role AddRole(Role role);
|
---|
63 |
|
---|
64 | [OperationContract]
|
---|
65 | void UpdateRole(Role role);
|
---|
66 |
|
---|
67 | [OperationContract]
|
---|
68 | void DeleteRole(Role role);
|
---|
69 |
|
---|
70 | [OperationContract]
|
---|
71 | IEnumerable<Role> GetUserRoles(User user);
|
---|
72 | #endregion
|
---|
73 |
|
---|
74 | #region Application
|
---|
75 | [OperationContract]
|
---|
76 | IEnumerable<Application> GetApplications();
|
---|
77 |
|
---|
78 | [OperationContract]
|
---|
79 | IEnumerable<User> GetApplicationUsers(Application application);
|
---|
80 |
|
---|
81 | [OperationContract]
|
---|
82 | Application AddApplication(Application application);
|
---|
83 |
|
---|
84 | [OperationContract]
|
---|
85 | void UpdateApplication(Application application);
|
---|
86 |
|
---|
87 | [OperationContract]
|
---|
88 | void DeleteApplication(Application application);
|
---|
89 | #endregion
|
---|
90 |
|
---|
91 | #region Client specific methods
|
---|
92 | [OperationContract]
|
---|
93 | bool CheckUserExists(string application, string userName, string password);
|
---|
94 |
|
---|
95 | [OperationContract]
|
---|
96 | bool GetUser(string application, string userName, string password);
|
---|
97 | #endregion
|
---|
98 | }
|
---|
99 | }
|
---|