From 3aa20f63d04b29f1b0bcc080f51adc30380d7b69 Mon Sep 17 00:00:00 2001 From: thinkgem Date: Tue, 5 Mar 2019 23:27:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88Shiro=E5=86=85=E9=83=A8?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E9=AA=8C=E8=AF=81=EF=BC=8C=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8validatePassword=E5=AF=86=E7=A0=81=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=96=B9=E6=B3=95=EF=BC=8C=E7=AE=80=E5=8C=96=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=AD=98=E5=82=A8=E7=9A=84=E4=B8=AA=E6=80=A7=E5=8C=96?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeesite/common/shiro/realm/AuthorizingRealm.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/core/src/main/java/com/jeesite/common/shiro/realm/AuthorizingRealm.java b/modules/core/src/main/java/com/jeesite/common/shiro/realm/AuthorizingRealm.java index 4f1e7d1a..83b4167c 100644 --- a/modules/core/src/main/java/com/jeesite/common/shiro/realm/AuthorizingRealm.java +++ b/modules/core/src/main/java/com/jeesite/common/shiro/realm/AuthorizingRealm.java @@ -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); } /**