Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/08/11 14:39:29 (14 years ago)
Author:
mjesner
Message:

#1196

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UserManagement/HeuristicLab.Services.Authentication/Interfaces/IAuthenticationService.cs

    r4979 r5257  
    1 using System;
     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;
    222using System.Collections.Generic;
    323using HeuristicLab.Services.Authentication.DataTransfer;
     
    525using System.Net.Security;
    626
    7 namespace HeuristicLab.Services.Authentication
    8 {
    9     [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    10     public interface IAuthenticationService
    11     {
    12         #region User
     27namespace HeuristicLab.Services.Authentication {
     28  [ServiceContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
     29  public interface IAuthenticationService {
    1330
    14         [OperationContract]
    15         User GetUser(Guid id);
     31    #region User
    1632
    17         [OperationContract]
    18         IEnumerable<User> GetAllUsers();
     33    [OperationContract]
     34    User GetUser(Guid id);
    1935
    20         [OperationContract]
    21         IEnumerable<User> GetUsers(Guid applicationId);
     36    [OperationContract()]
     37    IEnumerable<User> GetUsers();
    2238
    23         [OperationContract]
    24         Guid AddUser(User user);       
     39    [OperationContract()]
     40    IEnumerable<User> GetUsersForApplication(Guid applicationId);
    2541
    26         [OperationContract]
    27         bool DeleteUser(Guid id);
     42    [OperationContract]
     43    Guid AddUser(User user);
    2844
    29         [OperationContract]
    30         bool UpdateUser(User user);
     45    [OperationContract]
     46    void DeleteUser(Guid id);
    3147
    32         [OperationContract]
    33         bool AddUserToRole(Guid roleId, Guid userId);
     48    [OperationContract]
     49    void UpdateUser(User user);
    3450
    35         [OperationContract]
    36         IEnumerable<Guid> GetUsersInRole(Guid roleId);
     51    [OperationContract]
     52    void AddUserToRole(Guid roleId, Guid userId);
    3753
    38         //[OperationContract]
    39         //IEnumerable<User> GetUsersInRole(Guid roleId); // return = Guid
     54    [OperationContract]
     55    IEnumerable<Guid> GetUsersInRole(Guid roleId);
    4056
    41         [OperationContract]
    42         bool RemoveUserFromRole(Guid roleId, Guid userId);
     57    [OperationContract]
     58    void RemoveUserFromRole(Guid roleId, Guid userId);
    4359
    44         [OperationContract]
    45         bool IsUserInRole(Guid userId, Guid roleId);
     60    [OperationContract]
     61    bool IsUserInRole(Guid userId, Guid roleId);
    4662
    47         #endregion
     63    [OperationContract]
     64    User ResetPassword(string applicationName, string userName, string password);
    4865
    49         #region Role
     66    #endregion
    5067
    51         [OperationContract]
    52         Role GetRole(Guid id);
     68    #region Role
    5369
    54         [OperationContract]
    55         IEnumerable<Role> GetAllRoles();
     70    [OperationContract]
     71    Role GetRole(Guid id);
    5672
    57         [OperationContract]
    58         IEnumerable<Role> GetRoles(Guid applicationId);
     73    [OperationContract()]
     74    IEnumerable<Role> GetRoles();
    5975
    60         [OperationContract]
    61         Guid AddRole(Role role);
     76    [OperationContract()]
     77    IEnumerable<Role> GetRolesForApplication(Guid applicationId);
    6278
    63         [OperationContract]
    64         bool UpdateRole(Role role);
     79    [OperationContract]
     80    Guid AddRole(Role role);
    6581
    66         [OperationContract]
    67         bool DeleteRole(Guid id);
     82    [OperationContract]
     83    void UpdateRole(Role role);
    6884
     85    [OperationContract]
     86    void DeleteRole(Guid id);
    6987
    70         [OperationContract]
    71         IEnumerable<Guid> GetRolesForUser(Guid userId);
     88    [OperationContract]
     89    IEnumerable<Guid> GetRolesForUser(Guid userId);
    7290
     91    #endregion
    7392
    74         //[OperationContract]
    75         //IEnumerable<Role> GetRolesForUser(Guid userId);  // returnvalue = GUID
     93    #region Application
    7694
    77         #endregion
     95    [OperationContract]
     96    Application GetApplication(Guid id);
    7897
    79         #region Application
     98    [OperationContract]
     99    Guid AddApplication(Application application);
    80100
    81         [OperationContract]
    82         Application GetApplication(Guid id);
     101    [OperationContract]
     102    void DeleteApplication(Guid id);
    83103
    84         [OperationContract]
    85         Guid AddApplication(Application application); // ADD
     104    [OperationContract]
     105    IEnumerable<Application> GetApplications();
    86106
    87         [OperationContract]
    88         bool DeleteApplication(Guid id);
     107    [OperationContract]
     108    void UpdateApplication(Application application);
    89109
    90         [OperationContract]
    91         IEnumerable<DataTransfer.Application> GetApplications();
    92 
    93 
    94         [OperationContract]
    95         bool UpdateApplication(Application application);
    96 
    97         #endregion
    98 
    99        
    100     }
     110    #endregion
     111  }
    101112}
Note: See TracChangeset for help on using the changeset viewer.