Comments (10)
Hi Falco,
So by wildcard operator, you mean "ignore the tree" altogether? I like the idea of a .use()
paradigm (I kind of had something like that somewhere along the line, but it wasn't clear that most uses would want to implement all the LDAP operations, so I never got around to stubbing). I'm not sure that I like the idea of server.use(function(req, res, next))
without a mount point, since you would be effectively banning rootDSE, or any other logic (I almost always mount a handler for an admin user/group for example). But otherwise it should be doable.
m
from node-ldapjs.
Not just ignoring the tree but also the OP. For my use case a connect-like server.use('o=example', function(req, res, next){})
would be enough but I can image scenarios where you want do an action for every single request ignoring what it exactly does, e.g. logging.
from node-ldapjs.
Oh - I forgot to mention, the common case (imo) for wildcarding the operation is "post" action items (i.e., log). So in master as of today or yesterday is a new .after()
method that takes a chain of handlers that are guaranteed to be invoked after the last of your "normal" chains, regardless of whether an error was sent.
from node-ldapjs.
Okay, the .after()
method is really a good way for post operations like logging. Nevertheless it would be nice to implement a server.use('o=example', function(req, res, next))
which would make proxying and caching easier.
from node-ldapjs.
Yeah, not disputing that. I was just asking about server.use(function...)
only :)
from node-ldapjs.
I missed this also, i.e., having a callback that would receive every OP request careless of that rdn is sent.
Question (can't test now): If I have a server.search("o=example", cb)
, will this receive requests for *, o=example
or just o=example
?
from node-ldapjs.
In that example server.search('o=example', function(req, res, next) {})
will match o=example
and *, o=example
(i.e., all children). The ldapjs "router" does dn.parentOf($requested_dn)
from node-ldapjs.
Great! All I needed to ear :)
from node-ldapjs.
Wow, sorry I forgot about this one. It's in [email protected] now. There's a server.use()
now:
server.use(function(req, res, next) { console.log('hi!'); return next(); });
server.search(...);
from node-ldapjs.
Hi Mark,
thanks, that's exactly what I (still) needed!
from node-ldapjs.
Related Issues (20)
- replace operation --> modification must be an Attribute HOT 1
- ldapmodify works, but ldapjs client.modify() does't work as expected and return No Such Object HOT 5
- Unable to use attributes: 'member;range=0-1499' in ldapjs search HOT 3
- Support for SyncRequestControl HOT 1
- Not able to set password after user created HOT 3
- LDAP search return empty array for every subsequent search after the first search. HOT 1
- VError: Parser error for undefined:undefined: options.value must be a Buffer or Object HOT 18
- Support unicode DN HOT 8
- How can I obtain information indicating "Password Expired"? HOT 1
- Obtaining search entry attribute value by key HOT 1
- Invalidate Error
- Whitespace in (old) parseFilter causes `Uncaught Error: missing paren`
- Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme). HOT 4
- SASL / GSSAPI support HOT 3
- Open ssl issue with node 18 HOT 1
- Compatibility Issue Between ldapjs Library and FreeRADIUS HOT 1
- Edited: Ldapjs doesn't work after next.js build HOT 5
- Sharing unescape DN code for helper method
- (node:536) [LDAP_MESSAGE_DEP_001] LdapjsMessageWarning: messageID is deprecated. Use messageId instead. HOT 1
- Missing LDAP Result Codes in errors.js HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ldapjs.