Free cookie consent management tool by TermsFeed Policy Generator

source: branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs @ 6765

Last change on this file since 6765 was 5257, checked in by mjesner, 14 years ago

#1196

File size: 2.9 KB
Line 
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
21using System;
22using System.Collections.Generic;
23using HeuristicLab.Services.Authentication.DataTransfer;
24using System.ServiceModel;
25using System.Net.Security;
26
27namespace HeuristicLab.Services.Authentication {
28  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
29  public interface IAuthenticationService {
30
31    #region User
32
33    [OperationContract]
34    User GetUser(Guid id);
35
36    [OperationContract()]
37    IEnumerable<User> GetUsers();
38
39    [OperationContract()]
40    IEnumerable<User> GetUsersForApplication(Guid applicationId);
41
42    [OperationContract]
43    Guid AddUser(User user);
44
45    [OperationContract]
46    void DeleteUser(Guid id);
47
48    [OperationContract]
49    void UpdateUser(User user);
50
51    [OperationContract]
52    void AddUserToRole(Guid roleId, Guid userId);
53
54    [OperationContract]
55    IEnumerable<Guid> GetUsersInRole(Guid roleId);
56
57    [OperationContract]
58    void RemoveUserFromRole(Guid roleId, Guid userId);
59
60    [OperationContract]
61    bool IsUserInRole(Guid userId, Guid roleId);
62
63    [OperationContract]
64    User ResetPassword(string applicationName, string userName, string password);
65
66    #endregion
67
68    #region Role
69
70    [OperationContract]
71    Role GetRole(Guid id);
72
73    [OperationContract()]
74    IEnumerable<Role> GetRoles();
75
76    [OperationContract()]
77    IEnumerable<Role> GetRolesForApplication(Guid applicationId);
78
79    [OperationContract]
80    Guid AddRole(Role role);
81
82    [OperationContract]
83    void UpdateRole(Role role);
84
85    [OperationContract]
86    void DeleteRole(Guid id);
87
88    [OperationContract]
89    IEnumerable<Guid> GetRolesForUser(Guid userId);
90
91    #endregion
92
93    #region Application
94
95    [OperationContract]
96    Application GetApplication(Guid id);
97
98    [OperationContract]
99    Guid AddApplication(Application application);
100
101    [OperationContract]
102    void DeleteApplication(Guid id);
103
104    [OperationContract]
105    IEnumerable<Application> GetApplications();
106
107    [OperationContract]
108    void UpdateApplication(Application application);
109
110    #endregion
111  }
112}
Note: See TracBrowser for help on using the repository browser.