Method Protocols.LDAP.client()->get_attr_type_descr()
- Method get_attr_type_descr
mapping(string:mixed) get_attr_type_descr(stringattr,void|intstandard_attrs)- Description
Returns the attribute type description for the given attribute, which includes the name, object identifier, syntax, etc (see section 4.2 in RFC 2252 for details).
This might do a query to the server, but results are cached.
- Parameter
attr The name of the attribute. Might also be the object identifier on string form.
- Parameter
standard_attrs Flag that controls how the known standard attributes stored in Protocols.LDAP are to be used:
0Check the known standard attributes first. If the attribute isn't found there, query the server. This is the default.
1Don't check the known standard attributes, i.e. always use the schema from the server.
2Only check the known standard attributes. The server is never contacted.
- Returns
Returns a mapping where the indices are the terms that the server has returned and the values are their values on string form (dequoted and converted from UTF-8 as appropriate). Terms without values get
1as value in the mapping.The mapping might contain the following members (all except
"oid"are optional):"oid":stringThe object identifier on string form. According to the RFC, this should always be a dotted decimal string. However some LDAP servers, e.g. iPlanet, allows registering attributes without an assigned OID. In such cases this can be some other string. In the case of iPlanet, it uses the attribute name with "-oid" appended (c.f. http://docs.sun.com/source/816-5606-10/scmacfg.htm).
"NAME":stringArray with one or more names used for the attribute.
"DESC":stringDescription.
"OBSOLETE":stringFlag.
"SUP":stringDerived from this other attribute. The value is the name or oid of it. Note that the attribute description from the referenced type always is merged with the current one to make the returned description complete.
"EQUALITY":stringThe value is the name or oid of a matching rule.
"ORDERING":stringThe value is the name or oid of a matching rule.
"SUBSTR":stringThe value is the name or oid of a matching rule.
"syntax_oid":stringThe value is the oid of the syntax (RFC 2252, section 4.3.2). (This is extracted from the
"SYNTAX"term.)"syntax_len":stringOptional suggested minimum upper bound of the number of characters in the attribute (or bytes if the attribute is binary). (This is extracted from the
"SYNTAX"term.)"SINGLE-VALUE":stringFlag. Default multi-valued.
"COLLECTIVE":stringFlag. Default not collective.
"NO-USER-MODIFICATION":stringFlag. Default user modifiable.
"USAGE":stringThe value is any of the following:
"userApplications"Self-explanatory.
"directoryOperation""distributedOperation"DSA-shared.
"dSAOperation"DSA-specific, value depends on server.
There might be more fields for server extensions.
Zero is returned if the server didn't provide any attribute type description for
attr.- Note
It's the schema applicable at the base DN that is queried.
- Note
LDAPv3 is assumed.