Linger.Ldap.AspNetCore
0.2.0-alpha
This is a prerelease version of Linger.Ldap.AspNetCore.
dotnet add package Linger.Ldap.AspNetCore --version 0.2.0-alpha
NuGet\Install-Package Linger.Ldap.AspNetCore -Version 0.2.0-alpha
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linger.Ldap.AspNetCore" Version="0.2.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Linger.Ldap.AspNetCore --version 0.2.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Linger.Ldap.AspNetCore, 0.2.0-alpha"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Linger.Ldap.AspNetCore as a Cake Addin #addin nuget:?package=Linger.Ldap.AspNetCore&version=0.2.0-alpha&prerelease // Install Linger.Ldap.AspNetCore as a Cake Tool #tool nuget:?package=Linger.Ldap.AspNetCore&version=0.2.0-alpha&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Linger.Ldap.AspNetCore
Linger.Ldap.AspNetCore is a C# helper library designed to simplify LDAP operations in ASP.NET Core applications.
Features
- Easy integration with ASP.NET Core
- Simplified LDAP operations
- Configuration options via
Microsoft.Extensions.Options.ConfigurationExtensions
Getting Started
Prerequisites
- .NET 8.0 SDK or later
Installation
From Visual Studio
- Open the
Solution Explorer
. - Right-click on a project within your solution.
- Click on
Manage NuGet Packages...
. - Click on the
Browse
tab and search for "Linger.Ldap.AspNetCore". - Click on the
Linger.Ldap.AspNetCore
package, select the appropriate version and click Install.
Package Manager Console
PM> Install-Package Linger.Ldap.AspNetCore
.NET CLI Console
> dotnet add package Linger.Ldap.AspNetCore
Usage
Add the necessary configuration in your
appsettings.json
:"LdapConfig": { "Url": "ldap://your-ldap-server", "Security": false, "Domain": "your-domain", "Credentials": { "BindDn": "your-bind-dn", "BindCredentials": "your-bind-password" }, "SearchBase": "DC=example,DC=com", "SearchFilter": "(&(objectClass=user)(objectClass=person)(sAMAccountName={0}))", "Attributes": [ "memberOf", "displayName", "sAMAccountName", "userPrincipalName" ] }
Register the LDAP services in your
Program.cs
:using Linger.Ldap.AspNetCore; builder.Services.AddLdapService(builder.Configuration);
Inject and use the
ILdapService
in your controllers or services:public class HomeController : Controller { private readonly ILdapService _ldapService; public HomeController(ILdapService ldapService) { _ldapService = ldapService; } public IActionResult Index() { var ldapCredentials = new LdapCredentials { BindDn = userName, BindCredentials = password }; var users = _ldapService.FindUser(userName,ldapCredentials); return View(users); } }
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Linger.Ldap.ActiveDirectory (>= 0.2.0-alpha)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.1)
-
net9.0
- Linger.Ldap.ActiveDirectory (>= 0.2.0-alpha)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.2.0-alpha | 39 | 2/9/2025 |
0.1.2-alpha | 54 | 12/17/2024 |
0.1.1-alpha | 49 | 12/17/2024 |
0.1.0-alpha | 55 | 12/6/2024 |
0.0.4-alpha | 49 | 12/6/2024 |
0.0.3-alpha | 55 | 11/27/2024 |
0.0.2-alpha | 54 | 10/3/2024 |