gpt4 book ai didi

java - 了解spring ldap中过滤器的含义

转载 作者:行者123 更新时间:2023-11-30 10:35:34 25 4
gpt4 key购买 nike

.userSearchBase("ou=people")
.userSearchFilter("(uid={0})")
.groupSearchBase("ou=groups")
.groupSearchFilter("member={0}")

谁能解释一下这些过滤器是什么意思?
basesearch 过滤器有什么区别?此外,member={0} 是什么意思?

最佳答案

根据 documentation

public LdapAuthenticationProviderConfigurer<B> userSearchBase(String userSearchBase)

Search base for user searches. Defaults to "". Only used with userSearchFilter(String). Parameters: userSearchBase - search base for user searches Returns: the LdapAuthenticationProviderConfigurer for further customizations

user-search-base 用于指向要查找的基本路径 查找用户信息。

public LdapAuthenticationProviderConfigurer<B> userSearchFilter(String userSearchFilter)

The LDAP filter used to search for users (optional). For example "(uid={0})". The substituted parameter is the user's login name. Parameters: userSearchFilter - the LDAP filter used to search for users Returns: the LdapAuthenticationProviderConfigurer for further customizations

user-search-filter 是包含用户名的属性名。

public LdapAuthenticationProviderConfigurer<B> groupSearchBase(String groupSearchBase)

The search base for group membership searches. Defaults to "". Parameters: groupSearchBase - Returns: the LdapAuthenticationProviderConfigurer for further customizations

所以 group-search-base 是查找角色信息的基本路径。

public LdapAuthenticationProviderConfigurer<B> groupSearchFilter(String groupSearchFilter)

The LDAP filter to search for groups. Defaults to "(uniqueMember={0})". The substituted parameter is the DN of the user. Parameters: groupSearchFilter - the LDAP filter to search for groups Returns: the LdapAuthenticationProviderConfigurer for further customizations

所以 group-search-filter 是包含用户完整 dn(专有名称)的属性名称。

关于java - 了解spring ldap中过滤器的含义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41070882/

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