Library
Module
Module type
Parameter
Class
Class type
an object oriented ldap client interface
type op_lst = op list
The policy the client should take when it encounteres a referral. This is currently not used
The change type of an ldapentry. This controls some aspects of it's behavior
class type ldapentry_t = object ... end
The base type of an ldap entry represented in memory.
class ldapentry : object ... end
this object represents a remote object within local memory. It records all local changes made to it (if it's changetype is set to `MODIFY), and can commit them to the server at a later time via Ldap_ooclient.ldapcon.update_entry
.
val format_entry :
< attributes : string list
; dn : string
; get_value : string -> string list.. > ->
unit
toplevel formatter for ldapentry, prints the whole entry with a nice structure. Each attribute is in the correct syntax to be copied and pasted into a modify operation.
val format_entries :
< attributes : string list
; dn : string
; get_value : string -> string list.. >
list ->
unit
format lists of entries, in this case only print the dn
type changerec = [
| `Modification of
string * (Ldap_types.modify_optype * string * string list) list
| `Addition of ldapentry
| `Delete of string
| `Modrdn of string * int * string
]
The type of an ldap change record, used by extended LDIF
Ldap_funclient
val to_entry :
[< `Entry of Ldap_types.search_result_entry | `Referral of string list ] ->
ldapentry
given a search_result_entry as returned by ldap_funclient, produce an ldapentry containing either the entry, or the referral object
val of_entry : ldapentry -> Ldap_types.search_result_entry
given an ldapentry as returned by ldapcon, or constructed manually, produce a search_result_entry suitable for ldap_funclient, or ldap_funserver.
class ldapcon : ?connect_timeout:int -> ?referral_policy:[> `RETURN ] -> ?version:
int -> string list -> object ... end
This class abstracts a connection to an LDAP server (or servers), an instance will be connected to the server you specify and can be used to perform operations on that server.
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a, apply f (first arg) to each entry See List.iter
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a apply f (first arg) to each entry in reverse, and return a list containing the result of each application. See List.map
same as rev_map, but does it in order
given a source of ldapentry objects (unit -> ldapentry), such as the return value of ldapcon#search_a compute (f eN ... (f e2 (f e1 intial))) see List.fold_right.
Ldap_ooclient.scldapentry
, A schema aware derivative of Ldap_ooclient.ldapentry
. It contains an rfc2252 schema checker, and given the database schema, it can be used to garentee that operations performed in memory are valid against a standards compliant database. It has numerious uses, translation between two databases with different schemas an example of where it finds natural usage. For an example application
module OrdOid : sig ... end
an ordered oid type, for placing oids in sets
module Setstr : sig ... end
A set of Oids
The type of schema checking to perform in Ldap_ooclient.scldapentry
. Normally this is picked automatically, however it can be overridden in some cases.
val attrToOid :
Ldap_schemaparser.schema ->
Ldap_schemaparser.Lcstring.t ->
Ldap_schemaparser.Oid.t
given a name of an attribute name (canonical or otherwise), return its oid
val oidToAttr : Ldap_schemaparser.schema -> Ldap_schemaparser.Oid.t -> string
given the oid of an attribute, return its canonical name
val ocToOid :
Ldap_schemaparser.schema ->
Ldap_schemaparser.Lcstring.t ->
Ldap_schemaparser.Oid.t
given a name of an objectclass (canonical or otherwise), return its oid.
val oidToOc : Ldap_schemaparser.schema -> Ldap_schemaparser.Oid.t -> string
given the oid of an objectclass, return its canonical name
val getOc :
Ldap_schemaparser.schema ->
Ldap_schemaparser.Lcstring.t ->
Ldap_schemaparser.objectclass
get an objectclass structure by one of its names (canonical or otherwise, however getting it by canonical name is currently much faster)
val getAttr :
Ldap_schemaparser.schema ->
Ldap_schemaparser.Lcstring.t ->
Ldap_schemaparser.attribute
get an attr structure by one of its names (canonical or otherwise, however getting it by canonical name is currently much faster)
val equateAttrs :
Ldap_schemaparser.schema ->
Ldap_schemaparser.Lcstring.t ->
Ldap_schemaparser.Lcstring.t ->
bool
equate attributes by oid. This allows non canonical names to be handled correctly, for example "uid" and "userID" are actually the same attribute.
class scldapentry : Ldap_schemaparser.schema -> object ... end
A derivative of Ldap_ooclient.scldapentry
which includes abstractions for managing user accounts in the directory. This class is experimantal, and may be drastically changed in the next version. As with all experimental code, use with caution. A few of its features.
Ldap_ooclient.generator
) for the attribute, which will be used to derive it's value except in the case that it is specified explicitlyLdap_ooclient.service
The structure of a generator
type service = {
svc_name : string;
static_attrs : (string * string list) list;
generate_attrs : string list;
depends : string list;
}
The structure of a service
The type of error raised by attribute generators
You've asked it to generate an attribute (in a service) which doesn't have a generator
exception Generation_failed of generation_error
Generator has failed because of some kind of error
A service which the one you tried to add depends on doesn't exists
Your generator depends on an attribute which isn't in the schema
You have detached cycles in your generator dependancy lists
class ldapaccount : Ldap_schemaparser.schema -> (string, generator) Hashtbl.t -> (string,
service)
Hashtbl.t -> object ... end