Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 4964 was 4964, checked in by mjesner, 13 years ago

#1196

File size: 2.1 KB
Line 
1using System;
2using System.Collections.Generic;
3using HeuristicLab.Services.Authentication.DataTransfer;
4using System.ServiceModel;
5using System.Net.Security;
6
7namespace HeuristicLab.Services.Authentication
8{
9    [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
10    public interface IAuthenticationService
11    {
12        #region User
13
14        [OperationContract]
15        User GetUser(Guid id);
16
17
18        // IEnumerable<User> GetUsers();
19
20        [OperationContract]
21        IEnumerable<User> GetUsers(Guid applicationId);
22
23        [OperationContract]
24        Guid InsertUser(User user);         // => AddUser
25
26        [OperationContract]
27        bool DeleteUser(Guid id);
28
29        [OperationContract]
30        bool UpdateUser(User user);
31
32        [OperationContract]
33        bool AddUserToRole(Guid roleId, Guid userId);
34
35        [OperationContract]
36        bool RemoveUserFromRole(Guid roleId, Guid userId);
37
38        [OperationContract]
39        IEnumerable<Role> GetRolesForUser(Guid userId);  // returnvalue = GUID
40
41
42      // IsUserInRole
43      //
44
45        #endregion
46
47        #region Role
48
49        [OperationContract]
50        Role GetRole(Guid id);
51
52
53        //IEnumerable<Role> GetRoles();
54
55        [OperationContract]
56        IEnumerable<Role> GetRoles(Guid applicationId);
57
58        [OperationContract]
59        Guid InsertRole(Role role); // Add
60
61        [OperationContract]
62        bool UpdateRole(Role role);
63
64        [OperationContract]
65        bool DeleteRole(Guid id);
66
67        [OperationContract]
68        IEnumerable<User> GetUsersInRole(Guid roleId); // return = Guid
69
70        #endregion
71
72        #region Application
73
74        [OperationContract]
75        Application GetApplication(Guid id);
76
77        [OperationContract]
78        Guid InsertApplication(Application application); // ADD
79
80        [OperationContract]
81        bool DeleteApplication(Guid id);
82
83        [OperationContract]
84        IEnumerable<DataTransfer.Application> GetApplications();
85
86
87        [OperationContract]
88        bool UpdateApplication(Application application);
89
90        #endregion
91
92       
93    }
94}
Note: See TracBrowser for help on using the repository browser.