1 /******************************************************************************
3 * Copyright (c) 2003 Novell Inc. www.novell.com
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 *******************************************************************************/
24 // Novell.Directory.Ldap.LdapAuthProvider.cs
27 // Sunil Kumar (Sunilk@novell.com)
29 // (C) 2003 Novell, Inc (http://www.novell.com)
33 namespace Novell
.Directory
.Ldap
36 /// <summary> An implementation of LdapAuthHandler must be able to provide an
37 /// LdapAuthProvider object at the time of a referral. The class
38 /// encapsulates information that is used by the client for authentication
39 /// when following referrals automatically.
42 /// <seealso cref="LdapAuthHandler">
44 /// <seealso cref="LdapBindHandler">
46 public class LdapAuthProvider
48 /// <summary> Returns the distinguished name to be used for authentication on
49 /// automatic referral following.
52 /// <returns> The distinguished name from the object.
54 virtual public System
.String DN
62 /// <summary> Returns the password to be used for authentication on automatic
63 /// referral following.
66 /// <returns> The byte[] value (UTF-8) of the password from the object.
68 [CLSCompliantAttribute(false)]
69 virtual public sbyte[] Password
78 private System
.String dn
;
79 private sbyte[] password
;
81 /// <summary> Constructs information that is used by the client for authentication
82 /// when following referrals automatically.
85 /// <param name="dn"> The distinguished name to use when authenticating to
89 /// <param name="password"> The password to use when authenticating to a server.
91 [CLSCompliantAttribute(false)]
92 public LdapAuthProvider(System
.String dn
, sbyte[] password
)
95 this.password
= password
;