Active Directory/Connect: Difference between revisions

Content added Content deleted
(Added ColdFusion)
(→‎{{header|Racket}}: using ldap package)
Line 238: Line 238:


=={{header|Racket}}==
=={{header|Racket}}==
This version uses the ldap package, and was tested against OpenLDAP (with real values):
<lang racket>#lang racket
(require net/ldap)
(ldap-authenticate "ldap.somewhere.com" 389 "uid=username,ou=people,dc=somewhere,dc=com" password)</lang>

{{trans|C}}
{{trans|C}}


This is a direct translation of the C code -- I have no idea how to try it out since I don't have a working ldap server... So take it as a stub that waits for someone who can try it to do so. (And it's a low level thing anyway, there's an ldap package for Racket which I can't try for a similar reason.)
This is a direct translation of the C code -- I have no idea how to try it out since I don't have a working ldap server... So take it as a stub that waits for someone who can try it to do so. (And it's a low level thing anyway, there's an ldap package for Racket which I can't try for a similar reason.)


<lang racket>
<lang racket>#lang racket
#lang racket


(require ffi/unsafe ffi/unsafe/define)
(require ffi/unsafe ffi/unsafe/define)
Line 258: Line 262:
(ldap_simple_bind_s ld name password)
(ldap_simple_bind_s ld name password)


(ldap_unbind ld)
(ldap_unbind ld)</lang>
</lang>


=={{header|Ruby}}==
=={{header|Ruby}}==