using System; using System.Collections.Generic; using HeuristicLab.Services.Authentication.DataTransfer; using System.ServiceModel; using System.Net.Security; namespace HeuristicLab.Services.Authentication { [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] public interface IAuthenticationService { #region User [OperationContract] User GetUser(Guid id); [OperationContract] IEnumerable GetAllUsers(); [OperationContract] IEnumerable GetUsers(Guid applicationId); [OperationContract] Guid AddUser(User user); [OperationContract] bool DeleteUser(Guid id); [OperationContract] bool UpdateUser(User user); [OperationContract] bool AddUserToRole(Guid roleId, Guid userId); [OperationContract] IEnumerable GetUsersInRole(Guid roleId); //[OperationContract] //IEnumerable GetUsersInRole(Guid roleId); // return = Guid [OperationContract] bool RemoveUserFromRole(Guid roleId, Guid userId); [OperationContract] bool IsUserInRole(Guid userId, Guid roleId); #endregion #region Role [OperationContract] Role GetRole(Guid id); [OperationContract] IEnumerable GetAllRoles(); [OperationContract] IEnumerable GetRoles(Guid applicationId); [OperationContract] Guid AddRole(Role role); [OperationContract] bool UpdateRole(Role role); [OperationContract] bool DeleteRole(Guid id); [OperationContract] IEnumerable GetRolesForUser(Guid userId); //[OperationContract] //IEnumerable GetRolesForUser(Guid userId); // returnvalue = GUID #endregion #region Application [OperationContract] Application GetApplication(Guid id); [OperationContract] Guid AddApplication(Application application); // ADD [OperationContract] bool DeleteApplication(Guid id); [OperationContract] IEnumerable GetApplications(); [OperationContract] bool UpdateApplication(Application application); #endregion } }