LDAP 自定义身份验证提供者 Spring

时间:2021-06-10 14:32:02

标签: spring spring-security-ldap

我必须根据我的 LDAP 验证浏览器凭据。但是浏览器中给出的用户名/密码必须用于连接到 LDAP,它不是固定的用户名和密码。身份验证后,我只从 LDAP 获取角色。我看到了各种建议 AuthenticationProvider.authenticate 的例子。但我想知道我需要使用什么方法来验证或搜索用户,这将返回带有角色的用户对象。请指导。这对我有帮助Spring Security custom ldapAuthenticationProvider + custom ldapAuthoritiesPopulator,但我需要知道如何实现这里提到的 authenticateByLdap 以便它返回 DirContextOperations

0 个答案:

没有答案