Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/ldif-sexpr|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. == ldif-sexpr Read/write LDIF, LDAP search strings and related data formats. (RFCs 2849, 4514, 2254) == Requirements Irregex, ports, uri-common, base64. == API <procedure>(ldif-dn LDIF) -> *</procedure> Returns the distinguished name (as S-expression) from LDIF object. <procedure>(ldif-attributes LDIF) -> *</procedure> Returns the attributes (as list of S-expression) from LDIF object. <procedure>(make-ldif DN ATTRIBUTES) -> LDIF</procedure> Create an ldif record from {{DN}} and {{ATTRIBUTES}}. <procedure>(read [PORT])</procedure> Reads a LDIF record from {{PORT}} (default: {{current-input-port}}). Returns the ldif record or an {{eof-object}}. <procedure>(write LDIF [PORT])</procedure> Writes the LDIF object to {{PORT}} (default: {{current-output-port}}). <procedure>(rfc4514-read STRING) -> SEXPR</procedure> Parse {{STRING}} as RDN. <procedure>(rfc4514-write SEXPR [PORT])</procedure> Write {{SEXPR}} as RDN. <procedure>(write-ldap-filter OBJ [PORT])</procedure> Write {{OBJ}} as LDAP filter (RFC 2254) to {{PORT}} (default {{current-output-port}}). <procedure>(ldap-filter-string OBJ) -> STRING</procedure> Returns a string with the output of {{write-ldap-filter}} applied to {{OBJ}}. == Examples <enscript> (use (prefix ldif-sexpr ldif:)) (assert (equal? (ldif:ldif-attributes (with-input-from-string "dn: CN=foobar\nfoo: bar" ldif:read)) '(("foo" "bar")))) (assert (equal? (ldif:ldap-filter-string '(and (exists name) (= foo "bar"))) "(&(name=*)(foo=bar))")) </enscript> == About this egg === Author Jörg F. Wittenberger === Source Code The [[https://github.com/0-8-15/ldif-sexpr|ldif-sexpr egg repository]] is maintained on github. === Version History Version 0.1: Initial release. === License BSD
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you multiply 8 by 8?