ldapauth ~master

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:

Manual usage
Put the following dependency into your project's dependences section:

ldap

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.

TLS

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.

Authors:
  • Robert Schadek
Dependencies:
none
Versions:
1.0.0 2021-Mar-15
~master 2021-Mar-15
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
1.0
Short URL:
ldapauth.dub.pm