LDAP - Reference Documentation
Class implementing support for the Lightweight Directory Access Protocol (LDAP)
Index of Methods
Constructor
Prototype
LDAP(String url)
Description
Bind to LDAP server at given url.
Arguments
| Type | Name | Description |
|---|---|---|
String
|
url | URL of LDAP server to bind against. |
Exceptions
| Name | Value | Description |
|---|---|---|
| GPError | GPError.ARGUMENTS_MISSING | Too few arguments in call |
| GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call |
| GPError | GPError.INVALID_TYPE | Arguments must be of type X509 |
Example
ldap = new LDAP("ldap://ldap.ecard.sozialversicherung.at/c=at");
get()
Prototype
Array get(String dn)
Description
Return a node in the LDAP directory.
Return
Array
|
Array of attributes stored with the node. |
Exceptions
| Name | Value | Description |
|---|---|---|
| GPError | GPError.ARGUMENTS_MISSING | Too few arguments in call |
| GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call |
| GPError | GPError.INVALID_TYPE | Arguments must be of type X509 |
| GPError | GPError.DEVICE_ERROR | An error occured talking to the LDAP server |
Example
node = ldap.get("o=Hauptverband der österreichischen Sozialversicherungsträger");
for (i in node) {
print(i + " = " + node[i]);
}
search()
Prototype
Array search(String start, String filter)
Description
Search for an entry in the LDAP directory using a starting point and a search filter.
The search filter must conform to RFC2254
Return
Array
|
Array of entries in the LDAP directory. An entry itself is an array with the attributes as index. |
Exceptions
| Name | Value | Description |
|---|---|---|
| GPError | GPError.ARGUMENTS_MISSING | Too few arguments in call |
| GPError | GPError.INVALID_ARGUMENTS | Too many arguments in call |
| GPError | GPError.INVALID_TYPE | Arguments must be of type X509 |
| GPError | GPError.DEVICE_ERROR | An error occured talking to the LDAP server |
Example
list = ldap.search("ou=VPSig CA 2," +
"o=Hauptverband der österreichischen Sozialversicherungsträger",
"(&(cn=VP750126:PNSER:11716977281833697432792823912539163133345)" +
"(SNgesperrt=TRUE))");
for (i = 0; i < list.length; i++) {
print(list[i]._name);
for (j in list[i]) {
print(j + " = " + list[i][j]);
}
}
© Copyright 2003 - 2024 CardContact Systems GmbH , Minden, Germany
