| | |
| | | ! |
| | | ! CCPL HEADER END |
| | | ! |
| | | ! Copyright 2011 ForgeRock AS |
| | | ! Copyright 2011-2012 ForgeRock AS |
| | | ! |
| | | --> |
| | | <chapter xml:id='chap-controls' |
| | |
| | | |
| | | <section xml:id="get-supported-controls"> |
| | | <title>Determining Supported Controls</title> |
| | | <para>TODO</para> |
| | | |
| | | <para>For OpenDJ, the controls supported are listed in the |
| | | <citetitle>Administration Guide</citetitle> appendix, <link |
| | | xlink:href="admin-guide#appendix-controls" |
| | | xlink:role="http://docbook.org/xlink/role/olink"><citetitle>LDAP |
| | | Controls</citetitle></link>. You can access the list of OIDs for |
| | | supported LDAP controls by reading the <literal>supportedControl</literal> |
| | | attribute of the root DSE.</para> |
| | | |
| | | <screen>$ ldapsearch |
| | | --baseDN "" |
| | | --searchScope base |
| | | --port 1389 |
| | | "(objectclass=*)" supportedControl |
| | | dn: |
| | | supportedControl: 1.2.826.0.1.3344810.2.3 |
| | | supportedControl: 1.2.840.113556.1.4.1413 |
| | | supportedControl: 1.2.840.113556.1.4.319 |
| | | supportedControl: 1.2.840.113556.1.4.473 |
| | | supportedControl: 1.2.840.113556.1.4.805 |
| | | supportedControl: 1.3.6.1.1.12 |
| | | supportedControl: 1.3.6.1.1.13.1 |
| | | supportedControl: 1.3.6.1.1.13.2 |
| | | supportedControl: 1.3.6.1.4.1.26027.1.5.2 |
| | | supportedControl: 1.3.6.1.4.1.42.2.27.8.5.1 |
| | | supportedControl: 1.3.6.1.4.1.42.2.27.9.5.2 |
| | | supportedControl: 1.3.6.1.4.1.42.2.27.9.5.8 |
| | | supportedControl: 1.3.6.1.4.1.4203.1.10.1 |
| | | supportedControl: 1.3.6.1.4.1.4203.1.10.2 |
| | | supportedControl: 1.3.6.1.4.1.7628.5.101.1 |
| | | supportedControl: 2.16.840.1.113730.3.4.12 |
| | | supportedControl: 2.16.840.1.113730.3.4.16 |
| | | supportedControl: 2.16.840.1.113730.3.4.17 |
| | | supportedControl: 2.16.840.1.113730.3.4.18 |
| | | supportedControl: 2.16.840.1.113730.3.4.19 |
| | | supportedControl: 2.16.840.1.113730.3.4.2 |
| | | supportedControl: 2.16.840.1.113730.3.4.3 |
| | | supportedControl: 2.16.840.1.113730.3.4.4 |
| | | supportedControl: 2.16.840.1.113730.3.4.5 |
| | | supportedControl: 2.16.840.1.113730.3.4.9</screen> |
| | | |
| | | <para>The following excerpt shows the Java equivalent of the preceding |
| | | command.</para> |
| | | |
| | | <programlisting language="java"> |
| | | final LDAPConnectionFactory factory = new LDAPConnectionFactory( |
| | | host, port); |
| | | Connection connection = null; |
| | | |
| | | try |
| | | { |
| | | connection = factory.getConnection(); |
| | | connection.bind("", "".toCharArray()); |
| | | |
| | | final SearchResultEntry entry = connection.searchSingleEntry( |
| | | "", // DN is "" for root DSE. |
| | | SearchScope.BASE_OBJECT, // Read only the root DSE. |
| | | "objectclass=*", // Every object matches this filter. |
| | | "supportedControl"); // Check supported controls. |
| | | |
| | | final LDIFEntryWriter writer = new LDIFEntryWriter(System.out); |
| | | writer.writeComment("Supported controls for server " + host + ":" + port); |
| | | if (entry != null) writer.writeEntry(entry); |
| | | writer.flush(); |
| | | }</programlisting> |
| | | </section> |
| | | |
| | | <section xml:id="use-assertion-request-control"> |