取消Shiro内部密码验证,统一使用validatePassword密码验证方法,简化密码存储的个性化修改。

This commit is contained in:
thinkgem
2019-03-05 23:27:46 +08:00
parent ee9f3fd580
commit 3aa20f63d0

View File

@@ -5,8 +5,6 @@ package com.jeesite.common.shiro.realm;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.codec.Sha1Utils;
import com.jeesite.common.utils.SpringUtils;
@@ -31,10 +29,10 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
public AuthorizingRealm() {
super();
// 设定密码校验的Hash算法与迭代次数
HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(HASH_ALGORITHM);
matcher.setHashIterations(HASH_INTERATIONS);
this.setCredentialsMatcher(matcher);
// // 设定密码校验的Hash算法与迭代次数V4.1.4及以上版本不需要了统一使用validatePassword验证密码
// HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(HASH_ALGORITHM);
// matcher.setHashIterations(HASH_INTERATIONS);
// this.setCredentialsMatcher(matcher);
}
/**