~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to src/server/Simias.Server/.svn/text-base/IUserProvider.cs.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
 |
3
 
 | Copyright (c) 2007 Novell, Inc.
4
 
 | All Rights Reserved.
5
 
 |
6
 
 | This program is free software; you can redistribute it and/or
7
 
 | modify it under the terms of version 2 of the GNU General Public License as
8
 
 | published by the Free Software Foundation.
9
 
 |
10
 
 | This program is distributed in the hope that it will be useful,
11
 
 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 | GNU General Public License for more details.
14
 
 |
15
 
 | You should have received a copy of the GNU General Public License
16
 
 | along with this program; if not, contact Novell, Inc.
17
 
 |
18
 
 | To contact Novell about this file by physical or electronic mail,
19
 
 | you may find current contact information at www.novell.com
20
 
 |
21
 
 |  Author: Brady Anderson <banderso@novell.com>
22
 
 |***************************************************************************/
23
 
 
24
 
using System;
25
 
 
26
 
namespace Simias.Server
27
 
{
28
 
        /// <summary>
29
 
        /// Class for determining the capabilities of a user identity provider
30
 
        /// </summary>
31
 
        public class UserProviderCaps
32
 
        {
33
 
                /// <summary>
34
 
                /// Value used to determine if the provider supports external synchronizing.
35
 
                /// </summary>
36
 
                public bool ExternalSync;
37
 
 
38
 
                /// <summary>
39
 
                /// Value used to determine if the provider supports creating objects.
40
 
                /// </summary>
41
 
                public bool CanCreate;
42
 
 
43
 
                /// <summary>
44
 
                /// Value used to determine if the provider supports deleting objects.
45
 
                /// </summary>
46
 
                public bool CanDelete;
47
 
 
48
 
                /// <summary>
49
 
                /// Value used to determine if the provider supports modifying objects.
50
 
                /// </summary>
51
 
                public bool CanModify;
52
 
        }
53
 
        
54
 
        /// <summary>
55
 
        /// Interface for an external identity/user provider
56
 
        /// </summary>
57
 
        public interface IUserProvider
58
 
        {
59
 
                #region Properties
60
 
                /// <summary>
61
 
                /// Gets the name of the provider.
62
 
                /// </summary>
63
 
                string Name { get; }
64
 
 
65
 
                /// <summary>
66
 
                /// Gets the description of the provider.
67
 
                /// </summary>
68
 
                string Description { get; }
69
 
                #endregion
70
 
 
71
 
                #region Public Methods
72
 
                /// <summary>
73
 
                /// Method to create a user/identity in the external user database.
74
 
                /// Some external systems may not allow for creation of new users.
75
 
                /// </summary>
76
 
                /// <param name="Guid" mandatory="false">Guid associated to the user.</param>
77
 
                /// <param name="Username" mandatory="true">User or short name for the new user.</param>
78
 
                /// <param name="Password" mandatory="true">Password associated to the user.</param>
79
 
                /// <param name="Firstname" mandatory="false">First or given name associated to the user.</param>
80
 
                /// <param name="Lastname" mandatory="false">Last or family name associated to the user.</param>
81
 
                /// <param name="Fullname" mandatory="false">Full or complete name associated to the user.</param>
82
 
                /// <param name="Distinguished" mandatory="false">Distinguished name of the user.</param>
83
 
                /// <returns>RegistrationStatus</returns>
84
 
                RegistrationInfo
85
 
                Create(
86
 
                        string Guid,
87
 
                        string Username,
88
 
                        string Password,
89
 
                        string Firstname,
90
 
                        string Lastname,
91
 
                        string Fullname,
92
 
                        string Distinguished );
93
 
                
94
 
                /// <summary>
95
 
                /// Method to delete a user from the external identity/user database.
96
 
                /// Some external systems may not allow deletion of users.
97
 
                /// </summary>
98
 
                /// <param name="Username">Name of the user to delete from the external system.</param>
99
 
                /// <returns>true - successful  false - failed</returns>
100
 
                bool Delete( string Username );
101
 
                
102
 
                /// <summary>
103
 
                /// Method to retrieve the capabilities of a user identity
104
 
                /// provider.
105
 
                /// </summary>
106
 
                /// <returns>providers capabilities</returns>
107
 
                UserProviderCaps GetCapabilities();
108
 
 
109
 
                /// <summary>
110
 
                /// Method to set/reset a user's password
111
 
                /// Note: This method will be replaced when the self-service
112
 
                /// framework is designed and implemented.
113
 
                /// </summary>
114
 
                /// <param name="Username" mandatory="true">Username to set the password on.</param>
115
 
                /// <param name="Password" mandatory="true">New password.</param>
116
 
                /// <returns>true - successful</returns>
117
 
                bool SetPassword( string Username, string Password );
118
 
                
119
 
                /// <summary>
120
 
                /// Method to verify a user's password
121
 
                /// </summary>
122
 
                /// <param name="Username">User to verify the password against</param>
123
 
                /// <param name="Password">Password to verify</param>
124
 
                /// <param name="status">Structure used to pass additional information back to the user.</param>
125
 
                /// <returns>true - Valid password, false Invalid password</returns>
126
 
                bool VerifyPassword( string Username, string Password, Simias.Authentication.Status status );
127
 
                #endregion
128
 
        }
129
 
}