OpenLDAP 如何创建和使用作为 inetOrgPerson 子级的对象类
我正在尝试创建一个基于 LDAP 的地址簿。对于其中的每个收件人/用户,我需要存储有关他们的联系点的信息。信息将包括:
联系类型 - 电话/电子邮件/传真/寻呼机/等
标签 - 奶奶的阁楼、工作、家庭等
地址 - 实际电话号码/电子邮件/等
到目前为止,我已经发现没有任何现成的属性
可以处理这个问题,但我可以创建自己的 ContactPoint ObjectClass,使其成为结构类并使其成为 inetOrgPerson 的子级。但我似乎仍然无法理解这一切是如何结合在一起的。例如,我如何查询一个人及其联系人?
I'm trying to create an LDAP based address book. For each recipient/user in it, I will need to store information about their contact points. Information will include:
contact type - phone/email/fax/pager/etc.
label - grandma's attic, work, home, etc.
address - actual phone number/email/etc.
and few other properties
I've figured out by now that there is nothing out of box that can handle this, but that I can create my own ContactPoint ObjectClass, make it a structural class and have it be a child of inetOrgPerson. but I still can't seem to wrap my head around how this all comes together. For example, how would I query for a person and his/her contact points?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
LDAP 被设计为可扩展的,并且通常需要定义新的模式元素。当客户端找不到具有所需语法和名称的属性时,他们应该使用适当的对象类定义新属性。设计人员应该:
extensibleObject
。使用extensibleObject
是最后的选择,与使用非类型化编程语言类似,会导致系统质量差、脆弱且难以维护。有关详细信息,请参阅 "LDAP:编程实践"
LDAP is designed to be extensible and defining new schema elements is often required. When clients cannot find an attribute with the syntax and name they desire, they should define a new attribute with an appropriate object class. Designers should:
extensibleObject
unless absolutely required. UsingextensibleObject
is a last resort option and is similar to using an untyped programming language and results in poor quality, brittle, difficult to maintain systemsFor more information, please see "LDAP: Programming Practices"
使其成为
inetOrgPerson
和extensibleObject
。然后您可以使用其中任何位置的任何属性。我会避免定义您自己的对象类。Make it an
inetOrgPerson
and anextensibleObject
. Then you can use any attribute from anywhere in it. I would steer well clear of defining your own object classes.