Chinaunix

标题: LDAP URL格式问题 [打印本页]

作者: chen1mao    时间: 2009-08-07 10:56
标题: LDAP URL格式问题
ldapurl = scheme "://" [hostport] ["/"
[dn ["?" [attributes] ["?" [scope]
["?" [filter] ["?" extensions]]]]]]
scheme = "ldap"
attributes = attrdesc *("," attrdesc)
scope = "base" / "one" / "sub"
dn = distinguishedName from Section 3 of [1]
hostport = hostport from Section 5 of RFC1738 [5]
attrdesc = AttributeDescription from Section 4.1.5 of [2]
filter = filter from Section 4 of [4]
extensions = extension *("," extension)
extension = ["!"] extype ["=" exvalue]
extype = token / xtoken
exvalue = LDAPString from section 4.1.2 of [2]
token = oid from section 4.1 of [3]
xtoken = ("X-" / "x-") token

["?" extensions]]]]]]最后的这个扩展实在看不懂了...不知道能拿来做啥.

extype = token / xtoken
exvalue = LDAPString from section 4.1.2 of [2]
token = oid from section 4.1 of [3]
xtoken = ("X-" / "x-") token

这四个参数也有点不知所云...
哪位能给扫扫盲?
作者: chen1mao    时间: 2009-08-07 11:47
自问自答下:
扩展的格式定义如下:
attr [":dn"] [":" matchingrule] ":=" value

matchingrule是可以用OID来定位的.
matchingrule is usually given by an object identifier (OID), although if a descriptive name has been assigned to the matching rule, that may be used as well. The OIDs of the matching rules supported by your directory server will be given in its documentation.

详见:
Understanding and Deploying LDAP Directory Services, Second Edition
2.2:The LDAP Models




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2