d-libldap 0.0.2
A basic wrapper around C libldap
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:
d-libldap (alternatively, ldldapl - Lightweight D LDAP Library)
Requirements
- libldap (OpenLDAP's)
- standard D tools (dub, dmd, whatever, ...)
Building
As with every other dub project out there, just run dub
inside the project's directory. If you're using an IDE, you're on your own.
Will later be turned into a library project. Just a program while initial development is still ongoing.
Current features
- A simple wrapper around the basic LDAP features
- connect
- bind
- basic search
- That's it, really. For now.
Documentation
Documentation will be written inside the source itself somewhere in the future. For now, the goal is to get the basics working.
Future plans
- Fix the use of deprecated LDAP functions
- Add support modifying and adding new records
Licence
MIT
Usage example
import std.stdio;
import std.string;
import ldap.d;
void main()
{
auto ldap = new LDAPConnection("ldap.example.com", 389);
// simpleBindS will throw if an error occurs
ldap.simpleBindS("cn=someuser,cn=users,dc=example,dc=com", "SomePassword");
auto result = ldap.search(
"cn=users,dc=example,dc=com", // base
LDAPScope.subtree,
"(&(objectClass=user)(|(sAMAccountName=foo)(sAMAccountName=bar)))",
["name", "distinguishedName"]); // attributes to fetch
foreach(entry; result)
{
writefln("Message type: %s", entry.type);
writefln("DN: %s", entry.dn);
writefln("Attributes: %s", entry.attributes);
}
ldap.unbindS();
}
- Registered by Irenej Marc
- 0.0.2 released 9 years ago
- IrenejMarc/d-libldap
- github.com/GayDragon/d-libldap
- MIT
- Copyright © 2015, Irenej Marc
- Authors:
- Dependencies:
- none
- System dependencies:
- libldap, probably *nix
- Versions:
-
0.0.3 2015-Dec-16 0.0.2 2015-Dec-16 ~master 2016-Jul-02 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
93 downloads total
-
- Score:
- 0.9
- Short URL:
- d-libldap.dub.pm