This commit is contained in:
thinkgem
2019-04-11 10:54:44 +08:00
parent 9c0fc71587
commit 532ca319ec

View File

@@ -5,8 +5,11 @@ package com.jeesite.common.shiro.realm;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.authc.AuthenticationToken;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.codec.Sha1Utils;
import com.jeesite.common.shiro.authc.FormToken;
import com.jeesite.common.utils.SpringUtils;
import com.jeesite.modules.sys.entity.Log;
import com.jeesite.modules.sys.entity.User;
@@ -35,6 +38,22 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
// this.setCredentialsMatcher(matcher);
}
/**
* 获取登录令牌
*/
@Override
protected FormToken getFormToken(AuthenticationToken authcToken) {
return super.getFormToken(authcToken);
}
/**
* 获取用户信息
*/
@Override
protected User getUserInfo(FormToken token) {
return super.getUserInfo(token);
}
/**
* 生成密文密码生成随机的16位salt并经过1024次 sha-1 hash
* @param plainPassword 明文密码