[4584] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using HeuristicLab.Services.Authentication.DataTransfer;
|
---|
| 4 | using System.ServiceModel;
|
---|
| 5 | using System.Net.Security;
|
---|
| 6 |
|
---|
| 7 | namespace 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);
|
---|
[4590] | 84 | #endregion
|
---|
[4647] | 85 |
|
---|
| 86 | #region Membership
|
---|
| 87 |
|
---|
| 88 | [OperationContract]
|
---|
| 89 | Membership InsertMembership(Membership membership);
|
---|
| 90 |
|
---|
| 91 | #endregion
|
---|
[4584] | 92 | }
|
---|
| 93 | }
|
---|