Active Directory/Connect: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
|||
Line 298: | Line 298: | ||
my $mesg = $ldap->bind( $bind_dn, password => $bind_pass ); |
my $mesg = $ldap->bind( $bind_dn, password => $bind_pass ); |
||
</lang> |
</lang> |
||
=={{header|Phix}}== |
|||
{{trans|C}} |
|||
Note that builtins\ldap.e is incomplete, windows-only (depends on wldap32.dll), and largely untested. |
|||
This has been tested against a random 7-year-old list of public ldap servers, getting mixed errors of |
|||
LDAP_SERVER_DOWN/LDAP_INVALID_CREDENTIALS/LDAP_INVALID_DN_SYNTAX/LDAP_CONFIDENTIALITY_REQUIRED. |
|||
<lang Phix>include builtins/ldap.e |
|||
constant servers = { |
|||
"ldap.somewhere.com", |
|||
} |
|||
--... |
|||
string name="name", password="passwd" |
|||
--... |
|||
for i=1 to length(servers) do |
|||
atom ld = ldap_init(servers[i]) |
|||
integer res = ldap_simple_bind_s(ld, name, password) |
|||
printf(1,"%s: %d [%s]\n",{servers[i],res,ldap_err_desc(res)}) |
|||
--... after done with it... |
|||
ldap_unbind(ld) |
|||
end for</lang> |
|||
{{out}} |
|||
<pre> |
|||
ldap.somewhere.com: 81 [LDAP_SERVER_DOWN] |
|||
</pre> |
|||
=={{header|PHP}}== |
=={{header|PHP}}== |