Zend_Ldap-API.xml 10 KB

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