LDAP is the Lightweight Directory Access Protocol. It's a hierarchical organization of Users, Groups, and Organisational Units - which are containers for users and groups. Every object has it's own unique path to it's place in the directory - called a Distinguished Name, or DN. The bulk of the code is a wrapper around libldap

The main purpose of this function is to provide LDAP authentication to Shiny applications.

Initializing an LDAP connection

An LDAP object is an R6 object that can be created with ldap$new(). It has the following arguments:

host

The server that is hosting the LDAP server - either the IP address of the server or an appropriate hostname

base_dn

The section of the LDAP directory where the application will commence searching for Users. For example, we might have a DN for a single user of cn=John Doe,ou=Users,dc=example,dc=local, so the appropriate Base DN would be ou=Users,dc=example,dc=local

port

The port defined for this LDAP directory. Typically this is 389, or 636 for LDAP over SSL

Using the LDAP connection

By itself, an LDAP object is simply a pointer to a connection handle

Examples

ld <- ldap$new("zflexldap.com", "ou=users,ou=guests,dc=zflexsoftware,dc=com", 389) ld$bind("guest1", "guest1password", "uid")
#> <LDAP connection> #> URI: ldap://zflexldap.com:389 #> Authenticated: TRUE #> Authenticated user: guest1 #> Authenticated until: 2020-04-19 15:58:33