代码优化提示

This commit is contained in:
thinkgem
2023-12-28 09:33:26 +08:00
parent 231b8308c6
commit 93181c921d

View File

@@ -18,6 +18,9 @@ import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
/**
* 系统认证授权实现类
@@ -66,6 +69,14 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
protected void assertCredentialsMatch(AuthenticationToken authcToken, AuthenticationInfo authcInfo) throws AuthenticationException {
super.assertCredentialsMatch(authcToken, authcInfo);
}
/**
* 获取用户授权信息,默认返回类型 SimpleAuthorizationInfo
*/
@Override
protected AuthorizationInfo doGetAuthorizationInfo(LoginInfo loginInfo, Subject subject, Session session, User user) {
return super.doGetAuthorizationInfo(loginInfo, subject, session, user);
}
/**
* 生成密文密码生成随机的16位salt并经过1024次 sha-1 hash