#region License Information /* HeuristicLab * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL) * * This file is part of HeuristicLab. * * HeuristicLab is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * HeuristicLab is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HeuristicLab. If not, see . */ #endregion 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 GetUsers(); [OperationContract()] IEnumerable GetUsersForApplication(Guid applicationId); [OperationContract] Guid AddUser(User user); [OperationContract] void DeleteUser(Guid id); [OperationContract] void UpdateUser(User user); [OperationContract] void AddUserToRole(Guid roleId, Guid userId); [OperationContract] IEnumerable GetUsersInRole(Guid roleId); [OperationContract] void RemoveUserFromRole(Guid roleId, Guid userId); [OperationContract] bool IsUserInRole(Guid userId, Guid roleId); [OperationContract] User ResetPassword(string applicationName, string userName, string password); #endregion #region Role [OperationContract] Role GetRole(Guid id); [OperationContract()] IEnumerable GetRoles(); [OperationContract()] IEnumerable GetRolesForApplication(Guid applicationId); [OperationContract] Guid AddRole(Role role); [OperationContract] void UpdateRole(Role role); [OperationContract] void DeleteRole(Guid id); [OperationContract] IEnumerable GetRolesForUser(Guid userId); #endregion #region Application [OperationContract] Application GetApplication(Guid id); [OperationContract] Guid AddApplication(Application application); [OperationContract] void DeleteApplication(Guid id); [OperationContract] IEnumerable GetApplications(); [OperationContract] void UpdateApplication(Application application); #endregion } }