gpt4 book ai didi

java - OpenLDAP LDAPConnection.bind() dn 字符串中可以使用通配符吗?

转载 作者:行者123 更新时间:2023-12-01 15:50:52 27 4
gpt4 key购买 nike

我的具体问题是,当我尝试与以下完整 dn 绑定(bind)时,一切正常

new LDAPConnection().bind(LDAPConnection.LDAP_V3, 
"uid=me@wherever.com,ou=Lev1,ou=Lev2,o=Company", "secret".getBytes());

但是,当我尝试使用不完整的 dn 进行绑定(bind)时,我收到了“无效凭据”异常。

new LDAPConnection().bind(LDAPConnection.LDAP_V3,
"uid=me@wherever.com,ou=Lev1,o=Company", "secret".getBytes());

是否可以使用某种形式的通配符,例如“uid=me@wherever.com,ou=Lev1,ou=*,o=Company”?

最佳答案

没有。听起来您可能会将 bind() 与 search() 混淆。 bind() 是针对目录的身份验证,就像登录一样。使用通配符 dn 进行绑定(bind)就像使用通配符用户名进行登录一样。确实没有意义。

关于java - OpenLDAP LDAPConnection.bind() dn 字符串中可以使用通配符吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6073521/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com