Free cookie consent management tool by TermsFeed Policy Generator

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

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

#1196

File size: 2.4 KB
RevLine 
[4584]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    {
[4588]12        #region User
[4590]13
[4584]14        [OperationContract]
15        User GetUser(Guid id);
[4588]16
[4584]17        [OperationContract]
[4647]18        User GetUser(Guid applicationId, string userName);
[4588]19
20        [OperationContract]
[4647]21        IEnumerable<User> GetUsers(Guid applicationId);
22
23        [OperationContract]
[4590]24        bool InsertUser(User user);
25
26        [OperationContract]
27        bool DeleteUser(Guid id);
28
29        [OperationContract]
30        bool UpdateUser(User user);
31
[4647]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);
40
[4588]41        #endregion
42
[4590]43        #region Role
44
45        [OperationContract]
46        Role GetRole(Guid id);
[4647]47       
48        [OperationContract]
49        Role GetRole(Guid applicationId, string roleName);
[4590]50
51        [OperationContract]
[4647]52        IEnumerable<Role> GetRoles(Guid applicationId);
[4590]53
54        [OperationContract]
[4647]55        bool RoleExists(Guid roleId);
56
57        [OperationContract]
58        bool IsUserInRole(Guid roleId, Guid userId);
59       
60        [OperationContract]
[4590]61        bool InsertRole(Role role);
62
63        [OperationContract]
64        bool UpdateRole(Role role);
65
66        [OperationContract]
67        bool DeleteRole(Guid id);
68
69        [OperationContract]
[4647]70        IEnumerable<User> GetUsersInRole(Guid roleId);
71       
72        #endregion
[4590]73
[4647]74        #region Application
75
[4590]76        [OperationContract]
[4647]77        Application GetApplication(Guid id);
[4590]78
79        [OperationContract]
[4647]80        Application InsertApplication(Application application);
[4590]81
[4647]82        [OperationContract]
83        bool DeleteApplication(Application application);
[4726]84
85         [OperationContract]
86        IEnumerable<DataTransfer.Application> GetApplications();
87
[4590]88        #endregion
[4647]89
90        #region Membership
91
92        [OperationContract]
93        Membership InsertMembership(Membership membership);
94
95        #endregion
[4584]96    }
97}
Note: See TracBrowser for help on using the repository browser.