| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <title>Module HowTo - Defining the RDN</title> |
| 5 | <link rel="stylesheet" type="text/css" href="style/layout.css"> |
| 6 | <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"> |
| 7 | </head> |
| 8 | <body> |
| 9 | <div style="text-align: center;"> |
| 10 | <h1>Module HowTo - Defining the RDN<br> |
| 11 | </h1> |
| 12 | <div style="text-align: left;"><br> |
| 13 | Every LDAP DN starts with a RDN (relative DN). This is the value of a |
| 14 | LDAP attribute. Users usually use "uid", groups use "cn".<br> |
| 15 | You can provide a list of suitable RDN attributes for your module and |
| 16 | give them a priority, too.<br> |
| 17 | <br> |
| 18 | </div> |
| 19 | <div style="text-align: left;">You will need to implement the function <span |
| 20 | style="font-weight: bold;">get_RDNAttributes()</span> or use <span |
| 21 | style="font-weight: bold;">meta['RDN']</span>.<br> |
| 22 | <br> |
| 23 | <span style="font-weight: bold; text-decoration: underline;">Example:</span><br |
| 24 | style="font-weight: bold; text-decoration: underline;"> |
| 25 | <br> |
| 26 | The <span style="font-style: italic;">posixAccount</span> module |
| 27 | offers to create accounts with DNs uid=foo,dc=.... and cn=foo,dc=...<br> |
| 28 | The uid attribute has a higher priority as it is the usual attribute |
| 29 | for Unix accounts.<br> |
| 30 | <br> |
| 31 | <div class="mod-code"> |
| 32 | * Returns meta data that is interpreted by parent |
| 33 | class<br> |
| 34 | *<br> |
| 35 | * @return array array with meta data<br> |
| 36 | */<br> |
| 37 | <span style="font-weight: bold;"> function</span> |
| 38 | get_metaData() {<br> |
| 39 | $return = array();<br> |
| 40 | // RDN attributes<br> |
| 41 | $return["RDN"] = array("uid" |
| 42 | => "normal", "cn" => "low");<br> |
| 43 | [...]<br> |
| 44 | </div> |
| 45 | <br> |
| 46 | <br> |
| 47 | <br> |
| 48 | </div> |
| 49 | </div> |
| 50 | </body> |
| 51 | </html> |