More docs clean-up

This commit is contained in:
Patrick Mooney 2015-10-16 00:33:46 -05:00
parent 622b7486f7
commit 69eb6d9038
2 changed files with 5 additions and 26 deletions

View File

@ -15,7 +15,9 @@ with ldapjs.
///--- Shared handlers
function authorize(req, res, next) {
if (!req.connection.ldap.bindDN.equals('cn=root'))
/* Any user may search after bind, only cn=root has full power */
var isSearch = (req instanceof ldap.SearchRequest);
if (!req.connection.ldap.bindDN.equals('cn=root') && !isSearch)
return next(new ldap.InsufficientAccessRightsError());
return next();
@ -54,10 +56,10 @@ with ldapjs.
if (!db[dn])
return next(new ldap.NoSuchObjectError(dn));
if (!dn[dn].userpassword)
if (!db[dn].userpassword)
return next(new ldap.NoSuchAttributeError('userPassword'));
if (db[dn].userpassword !== req.credentials)
if (db[dn].userpassword.indexOf(req.credentials) === -1)
return next(new ldap.InvalidCredentialsError());
res.end();

View File

@ -1,23 +0,0 @@
---
titile: Persistent Search Cache API| ldapjs
markdown2extras: wiki-tables
logo-color: green
logo-font-family: google:Aldrich, Verdana, sans-serif
header-font-family: google:Aldrich, Verdana, sans-serif
---
# ldapjs Persistent Search Cache API
This document covers the ldapjs Persistent Search Cache API and assumes you are familiar with LDAP. If you're not, read the [guide](http://ldapjs.org/guide.html) first.
This document also assumes you are familiar with LDAP persistent search. If you're not, read the [rfc](http://tools.ietf.org/id/draft-ietf-ldapext-psearch-03.txt) first.
Note this API is a cache used to store all connected persistent search clients, and does not actually implement persistent search.
# addClient(req, res, callback)
Adds a client to the cache.
# removeClient(req, res, callback)
Removes a client from the cache.