Functions to auth a (username|email/password) pair against ldap, active directory
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
Use this to authenticate a username with password against a hostname that is either a ldap or active directory.
Uses tls if possible so you don't send people's password in clear text.
This is a tiny lib to mimic the ldap util whoami. The only function you should be required to use is:
LDAPLoginResult login(string host, string username, string password);
The function will throw if the login fails for whatever reason.
On success the LDAPLoginResult will contain the userId inside the ldap/active directory.
The returnCode stored in the LDAPLoginResult will be 0 on success.
Properly using tls/ssl to connect to ldap or active directory is required but not as easy as it should. Especially, if the active directory is configured creatively.
Before you put this into production test with wireshark or similar that TLS works.
- Registered by Robert Schadek
- ~master released a year ago
- Copyright © 2021, Symmetry Investments