-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathILdapConnectionService.cs
39 lines (33 loc) · 1.62 KB
/
ILdapConnectionService.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// <copyright file="ILdapConnectionService.cs" company="Visualisierungsinstitut der Universität Stuttgart">
// Copyright © 2021 - 2024 Visualisierungsinstitut der Universität Stuttgart.
// Licensed under the MIT licence. See LICENCE file for details.
// </copyright>
// <author>Christoph Müller</author>
using System.DirectoryServices.Protocols;
namespace Visus.DirectoryAuthentication {
/// <summary>
/// Interface of a service providing access to a configured LDAP connection.
/// </summary>
public interface ILdapConnectionService {
/// <summary>
/// Connect to the preconfigured LDAP service with the specified
/// credentials.
/// </summary>
/// <param name="username">The user name used to perform the LDAP bind.
/// If both, <paramref name="username"/> and <paramref name="password"/>
/// are <c>null</c>, the service shall perform an anonymous bind.
/// </param>
/// <param name="password">The password used to perfom the LDAP bind.
/// If both, <paramref name="username"/> and <paramref name="password"/>
/// are <c>null</c>, the service shall perform an anonymous bind.
/// </param>
/// <returns>A new LDAP connection</returns>
LdapConnection Connect(string? username, string? password);
/// <summary>
/// Connect to the preconfigured LDAP service with the preconfigured
/// credentials from <see cref="Configuration.LdapOptions"/>.
/// </summary>
/// <returns>A new LDAP connection.</returns>
LdapConnection Connect() => this.Connect(null, null);
}
}