1
/****************************************************************************
3
| Copyright (c) 2007 Novell, Inc.
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.
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.
15
| You should have received a copy of the GNU General Public License
16
| along with this program; if not, contact Novell, Inc.
18
| To contact Novell about this file by physical or electronic mail,
19
| you may find current contact information at www.novell.com
21
| Author: Brady Anderson <banderso@novell.com>
22
|***************************************************************************/
26
namespace Simias.Server
29
/// Class for determining the capabilities of a user identity provider
31
public class UserProviderCaps
34
/// Value used to determine if the provider supports external synchronizing.
36
public bool ExternalSync;
39
/// Value used to determine if the provider supports creating objects.
41
public bool CanCreate;
44
/// Value used to determine if the provider supports deleting objects.
46
public bool CanDelete;
49
/// Value used to determine if the provider supports modifying objects.
51
public bool CanModify;
55
/// Interface for an external identity/user provider
57
public interface IUserProvider
61
/// Gets the name of the provider.
66
/// Gets the description of the provider.
68
string Description { get; }
71
#region Public Methods
73
/// Method to create a user/identity in the external user database.
74
/// Some external systems may not allow for creation of new users.
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>
92
string Distinguished );
95
/// Method to delete a user from the external identity/user database.
96
/// Some external systems may not allow deletion of users.
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 );
103
/// Method to retrieve the capabilities of a user identity
106
/// <returns>providers capabilities</returns>
107
UserProviderCaps GetCapabilities();
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.
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 );
120
/// Method to verify a user's password
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 );