Hi Folks,
I have created a NuGet package for .NET applications, using which, we can implement the LDAP\domain authentication.
Pre-requisite
How to use in the project
- Install nuGet package offline
- Create a new project.
- Add this package from NuGet Manager.
- It will add the required settings in configuration file of the project.
- Here is the sample code to use the library.
- static void Main(string[] args) {
- Console.WriteLine($ "Please enter userId...");
- var userName = Console.ReadLine();
- Console.WriteLine($ "Please enter password...");
- var password = Console.ReadLine();
- var user = new ActiveDirectoryHelper().AuthenticateUser(userName, password);
- if (user != null) {
- Console.WriteLine($ "Display Name : {user.DisplayName}");
- }
- Console.ReadLine();
- }