- Timestamp:
- 01/08/11 14:39:29 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs
r4979 r5257 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) 2002-2010 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 using System; 2 22 using System.Collections.Generic; 3 23 using HeuristicLab.Services.Authentication.DataTransfer; … … 5 25 using System.Net.Security; 6 26 7 namespace HeuristicLab.Services.Authentication 8 { 9 [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] 10 public interface IAuthenticationService 11 { 12 #region User 27 namespace HeuristicLab.Services.Authentication { 28 [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] 29 public interface IAuthenticationService { 13 30 14 [OperationContract] 15 User GetUser(Guid id); 31 #region User 16 32 17 18 IEnumerable<User> GetAllUsers();33 [OperationContract] 34 User GetUser(Guid id); 19 35 20 [OperationContract]21 IEnumerable<User> GetUsers(Guid applicationId);36 [OperationContract()] 37 IEnumerable<User> GetUsers(); 22 38 23 [OperationContract]24 Guid AddUser(User user);39 [OperationContract()] 40 IEnumerable<User> GetUsersForApplication(Guid applicationId); 25 41 26 27 bool DeleteUser(Guid id);42 [OperationContract] 43 Guid AddUser(User user); 28 44 29 30 bool UpdateUser(User user);45 [OperationContract] 46 void DeleteUser(Guid id); 31 47 32 33 bool AddUserToRole(Guid roleId, Guid userId);48 [OperationContract] 49 void UpdateUser(User user); 34 50 35 36 IEnumerable<Guid> GetUsersInRole(Guid roleId);51 [OperationContract] 52 void AddUserToRole(Guid roleId, Guid userId); 37 53 38 //[OperationContract]39 //IEnumerable<User> GetUsersInRole(Guid roleId); // return = Guid54 [OperationContract] 55 IEnumerable<Guid> GetUsersInRole(Guid roleId); 40 56 41 42 boolRemoveUserFromRole(Guid roleId, Guid userId);57 [OperationContract] 58 void RemoveUserFromRole(Guid roleId, Guid userId); 43 59 44 45 60 [OperationContract] 61 bool IsUserInRole(Guid userId, Guid roleId); 46 62 47 #endregion 63 [OperationContract] 64 User ResetPassword(string applicationName, string userName, string password); 48 65 49 #region Role66 #endregion 50 67 51 [OperationContract] 52 Role GetRole(Guid id); 68 #region Role 53 69 54 55 IEnumerable<Role> GetAllRoles();70 [OperationContract] 71 Role GetRole(Guid id); 56 72 57 [OperationContract]58 IEnumerable<Role> GetRoles(Guid applicationId);73 [OperationContract()] 74 IEnumerable<Role> GetRoles(); 59 75 60 [OperationContract]61 Guid AddRole(Role role);76 [OperationContract()] 77 IEnumerable<Role> GetRolesForApplication(Guid applicationId); 62 78 63 64 bool UpdateRole(Role role);79 [OperationContract] 80 Guid AddRole(Role role); 65 81 66 67 bool DeleteRole(Guid id);82 [OperationContract] 83 void UpdateRole(Role role); 68 84 85 [OperationContract] 86 void DeleteRole(Guid id); 69 87 70 71 88 [OperationContract] 89 IEnumerable<Guid> GetRolesForUser(Guid userId); 72 90 91 #endregion 73 92 74 //[OperationContract] 75 //IEnumerable<Role> GetRolesForUser(Guid userId); // returnvalue = GUID 93 #region Application 76 94 77 #endregion 95 [OperationContract] 96 Application GetApplication(Guid id); 78 97 79 #region Application 98 [OperationContract] 99 Guid AddApplication(Application application); 80 100 81 82 Application GetApplication(Guid id);101 [OperationContract] 102 void DeleteApplication(Guid id); 83 103 84 85 Guid AddApplication(Application application); // ADD104 [OperationContract] 105 IEnumerable<Application> GetApplications(); 86 106 87 88 bool DeleteApplication(Guid id);107 [OperationContract] 108 void UpdateApplication(Application application); 89 109 90 [OperationContract] 91 IEnumerable<DataTransfer.Application> GetApplications(); 92 93 94 [OperationContract] 95 bool UpdateApplication(Application application); 96 97 #endregion 98 99 100 } 110 #endregion 111 } 101 112 }
Note: See TracChangeset
for help on using the changeset viewer.