繁体   English   中英

JCIFS使用哈希密码进行身份验证

[英]JCIFS authenticate with hashed password

我正在使用spring-security LDAP验证我的应用程序中的用户。 我想使用经过身份验证的用户凭据访问samba共享。 我使用JCIFS库: http ://jcifs.samba.org/。

SecurityContextHolder.getContext().getAuthentication().getPrincipal(); 仅给我用户的哈希(SHAA)密码。 是否可以使用此哈希而不是纯文本密码来认证JCIFS?

我无法使用哈希密码,但是在我的用例中,spring security提供了配置以保留普通密码:

<authentication-manager erase-credentials="false">

进行此配置后,您可以通过以下方式获取密码:

(String) SecurityContextHolder.getContext().getAuthentication().getCredentials();

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM