Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 5155 was 4979, checked in by jwolfing, 14 years ago

#1196 Changed BaseClasses in Data Transfer Objects, added Methods to User and Role ServiceClasses

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
[4979]17        [OperationContract]
18        IEnumerable<User> GetAllUsers();
[4964]19
[4926]20        [OperationContract]
21        IEnumerable<User> GetUsers(Guid applicationId);
[4588]22
[4926]23        [OperationContract]
[4979]24        Guid AddUser(User user);       
[4647]25
[4926]26        [OperationContract]
27        bool DeleteUser(Guid id);
[4590]28
[4926]29        [OperationContract]
30        bool UpdateUser(User user);
[4590]31
[4926]32        [OperationContract]
33        bool AddUserToRole(Guid roleId, Guid userId);
[4590]34
[4926]35        [OperationContract]
[4979]36        IEnumerable<Guid> GetUsersInRole(Guid roleId);
37
38        //[OperationContract]
39        //IEnumerable<User> GetUsersInRole(Guid roleId); // return = Guid
40
41        [OperationContract]
[4926]42        bool RemoveUserFromRole(Guid roleId, Guid userId);
[4647]43
[4926]44        [OperationContract]
[4979]45        bool IsUserInRole(Guid userId, Guid roleId);
[4647]46
[4588]47        #endregion
48
[4590]49        #region Role
50
[4926]51        [OperationContract]
52        Role GetRole(Guid id);
[4590]53
[4979]54        [OperationContract]
55        IEnumerable<Role> GetAllRoles();
[4590]56
[4926]57        [OperationContract]
58        IEnumerable<Role> GetRoles(Guid applicationId);
[4647]59
[4926]60        [OperationContract]
[4979]61        Guid AddRole(Role role);
[4590]62
[4926]63        [OperationContract]
64        bool UpdateRole(Role role);
[4590]65
[4926]66        [OperationContract]
67        bool DeleteRole(Guid id);
[4590]68
[4979]69
[4926]70        [OperationContract]
[4979]71        IEnumerable<Guid> GetRolesForUser(Guid userId);
[4926]72
[4979]73
74        //[OperationContract]
75        //IEnumerable<Role> GetRolesForUser(Guid userId);  // returnvalue = GUID
76
[4647]77        #endregion
[4590]78
[4647]79        #region Application
80
[4926]81        [OperationContract]
82        Application GetApplication(Guid id);
[4590]83
[4926]84        [OperationContract]
[4979]85        Guid AddApplication(Application application); // ADD
[4590]86
[4926]87        [OperationContract]
88        bool DeleteApplication(Guid id);
[4726]89
[4926]90        [OperationContract]
91        IEnumerable<DataTransfer.Application> GetApplications();
[4726]92
[4962]93
94        [OperationContract]
95        bool UpdateApplication(Application application);
96
[4590]97        #endregion
[4647]98
[4926]99       
[4584]100    }
101}
Note: See TracBrowser for help on using the repository browser.