Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] LDAP userPassword disable #78

Open
zhengfc opened this issue Dec 25, 2019 · 1 comment
Open

[FEATURE] LDAP userPassword disable #78

zhengfc opened this issue Dec 25, 2019 · 1 comment
Assignees
Labels
feature 新功能建议

Comments

@zhengfc
Copy link

zhengfc commented Dec 25, 2019

你在什么场景下需要该功能?

大部分LDAP为了安全是不可以直接读取到userPassword,所以需要搜寻到指定节点提交密码待LDAP server验证返回

描述可能的解决方案

请尽量清晰精准地描述你期待我们要做的,描述你想到的实现方案。

描述你认为的候选方案

LdapQuery query = LdapQueryBuilder.query()
		.where("objectclass").is("person")
		.and("sAMAccountName").is(request.getUsername());
try {
	ldapTemplate.authenticate(query, request.getPassword());
} catch (Exception e) {
	log.warn(e.getMessage());
	throw new ServiceException("用户名或密码错误,请重新尝试");
}
return Result.success(personRepository.findByAccount(request.getUsername()));
@zhengfc zhengfc added the feature 新功能建议 label Dec 25, 2019
@xkcoding
Copy link
Owner

xkcoding commented Jan 5, 2020

感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 新功能建议
Projects
None yet
Development

No branches or pull requests

2 participants