Zend_Ldap-API.xml 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- EN-Revision: 16641 -->
  3. <!-- Reviewed: no -->
  4. <sect1 id="zend.ldap.api" xmlns:xi="http://www.w3.org/2001/XInclude">
  5. <title>API overview</title>
  6. <sect2 id="zend.ldap.api.configuration">
  7. <title>Configuration / options</title>
  8. <para>
  9. The <classname>Zend_Ldap</classname> component accepts an array of options either
  10. supplied to the constructor or through the <methodname>setOptions()</methodname>
  11. method. The permitted options are as follows:
  12. </para>
  13. <table id="zend.ldap.api.configuration.table">
  14. <title>Zend_Ldap Options</title>
  15. <tgroup cols="2">
  16. <thead>
  17. <row>
  18. <entry>Name</entry>
  19. <entry>Description</entry>
  20. </row>
  21. </thead>
  22. <tbody>
  23. <row>
  24. <entry>host</entry>
  25. <entry>
  26. The default hostname of <acronym>LDAP</acronym> server if not
  27. supplied to <methodname>connect()</methodname> (also may be used
  28. when trying to canonicalize usernames in
  29. <methodname>bind()</methodname>).
  30. </entry>
  31. </row>
  32. <row>
  33. <entry>port</entry>
  34. <entry>
  35. Default port of <acronym>LDAP</acronym> server if not supplied to
  36. <methodname>connect()</methodname>.
  37. </entry>
  38. </row>
  39. <row>
  40. <entry>useStartTls</entry>
  41. <entry>
  42. Whether or not the <acronym>LDAP</acronym> client should use
  43. <acronym>TLS</acronym> (aka <acronym>SSLv2</acronym>) encrypted
  44. transport. A value of <constant>TRUE</constant> is strongly favored
  45. in production environments to prevent passwords from be transmitted in
  46. clear text. The default value is <constant>FALSE</constant>, as servers
  47. frequently require that a certificate be installed separately after
  48. installation. The <emphasis>useSsl</emphasis> and
  49. <emphasis>useStartTls</emphasis> options are mutually exclusive.
  50. The <emphasis>useStartTls</emphasis> option should be favored
  51. over <emphasis>useSsl</emphasis> but not all servers support
  52. this newer mechanism.
  53. </entry>
  54. </row>
  55. <row>
  56. <entry>useSsl</entry>
  57. <entry>
  58. Whether or not the <acronym>LDAP</acronym> client should use
  59. <acronym>SSL</acronym> encrypted transport. The
  60. <emphasis>useSsl</emphasis> and <emphasis>useStartTls</emphasis>
  61. options are mutually exclusive.
  62. </entry>
  63. </row>
  64. <row>
  65. <entry>username</entry>
  66. <entry>
  67. The default credentials username. Some servers require that this
  68. be in DN form. This must be given in DN form if the
  69. <acronym>LDAP</acronym> server requires a DN to bind and binding
  70. should be possible with simple usernames.
  71. </entry>
  72. </row>
  73. <row>
  74. <entry>password</entry>
  75. <entry>
  76. The default credentials password (used only with username
  77. above).
  78. </entry>
  79. </row>
  80. <row>
  81. <entry>bindRequiresDn</entry>
  82. <entry>
  83. If <constant>TRUE</constant>, this instructs
  84. <classname>Zend_Ldap</classname> to retrieve the DN for the
  85. account used to bind if the username is not
  86. already in DN form. The default value is <constant>FALSE</constant>.
  87. </entry>
  88. </row>
  89. <row>
  90. <entry>baseDn</entry>
  91. <entry>
  92. The default base DN used for searching (e.g., for accounts).
  93. This option is required for most account related operations and should
  94. indicate the DN under which accounts are located.
  95. </entry>
  96. </row>
  97. <row>
  98. <entry>accountCanonicalForm</entry>
  99. <entry>
  100. A small integer indicating the form to which account names
  101. should be canonicalized. See the <link
  102. linkend="zend.ldap.introduction.theory-of-operations.account-name-canonicalization"><emphasis>Account
  103. Name Canonicalization</emphasis></link>
  104. section below.
  105. </entry>
  106. </row>
  107. <row>
  108. <entry>accountDomainName</entry>
  109. <entry>
  110. The FQDN domain for which the target <acronym>LDAP</acronym> server
  111. is an authority (e.g., example.com).
  112. </entry>
  113. </row>
  114. <row>
  115. <entry>accountDomainNameShort</entry>
  116. <entry>
  117. The 'short' domain for which the target <acronym>LDAP</acronym> server
  118. is an authority. This is usually used to specify the NetBIOS
  119. domain name for Windows networks but may also be used by non-AD servers.
  120. </entry>
  121. </row>
  122. <row>
  123. <entry>accountFilterFormat</entry>
  124. <entry>
  125. The <acronym>LDAP</acronym> search filter used to search for accounts.
  126. This string is a <ulink
  127. url="http://php.net/sprintf"><code>sprintf()</code></ulink>
  128. style expression that must contain one '<emphasis>%s</emphasis>' to
  129. accommodate the username. The default value is
  130. '<emphasis>(&amp;(objectClass=user)(sAMAccountName=%s))</emphasis>'
  131. unless <emphasis>bindRequiresDn</emphasis> is set to
  132. <constant>TRUE</constant>, in which case the default is
  133. '<emphasis>(&amp;(objectClass=posixAccount)(uid=%s))</emphasis>'.
  134. Users of custom schemas may need to change this option.
  135. </entry>
  136. </row>
  137. <row>
  138. <entry>allowEmptyPassword</entry>
  139. <entry>
  140. Some <acronym>LDAP</acronym> servers can be configured to accept an
  141. empty string password as an anonymous bind. This behavior is almost
  142. always undesirable. For this reason, empty passwords are explicitly
  143. disallowed. Set this value to <constant>TRUE</constant> to allow an
  144. empty string password to be submitted during the bind.
  145. </entry>
  146. </row>
  147. <row>
  148. <entry>optReferrals</entry>
  149. <entry>
  150. If set to <constant>TRUE</constant>, this option indicates to the
  151. <acronym>LDAP</acronym> client that referrals should be followed.
  152. The default value is <constant>FALSE</constant>.
  153. </entry>
  154. </row>
  155. <row>
  156. <entry>tryUsernameSplit</entry>
  157. <entry>
  158. If set to <constant>FALSE</constant>, this option indicates that the
  159. given username should not be split at the first <emphasis>@</emphasis>
  160. or <emphasis>\</emphasis> character to separate the username from
  161. the domain during the binding-procedure. This allows the user to
  162. use usernames that contain an <emphasis>@</emphasis> or
  163. <emphasis>\</emphasis> character that do not
  164. inherit some domain-information, e.g. using email-addresses for
  165. binding. The default value is <constant>TRUE</constant>.
  166. </entry>
  167. </row>
  168. </tbody>
  169. </tgroup>
  170. </table>
  171. </sect2>
  172. <sect2 id="zend.ldap.api.reference">
  173. <title>API Reference</title>
  174. <note>
  175. <para>Method names in <emphasis>italics</emphasis> are static methods.</para>
  176. </note>
  177. <xi:include href="Zend_Ldap-API-Ldap.xml" />
  178. <xi:include href="Zend_Ldap-API-Ldap-Attribute.xml" />
  179. <xi:include href="Zend_Ldap-API-Ldap-Dn.xml" />
  180. <xi:include href="Zend_Ldap-API-Ldap-Filter.xml" />
  181. <xi:include href="Zend_Ldap-API-Ldap-Node.xml" />
  182. <xi:include href="Zend_Ldap-API-Ldap-Node-RootDse.xml" />
  183. <xi:include href="Zend_Ldap-API-Ldap-Node-Schema.xml" />
  184. <xi:include href="Zend_Ldap-API-Ldap-Ldif-Encoder.xml" />
  185. </sect2>
  186. </sect1>