XiaoRuby
2023-07-27 ad7151b14f2721b0fa40a903c6e65a2c511dd4c5
user-server/src/main/java/com/yuanchu/limslaboratory/shiro/realm/JwtRealm.java
@@ -2,10 +2,8 @@
import com.yuanchu.limslaboratory.pojo.User;
import com.yuanchu.limslaboratory.shiro.JwtToken;
import com.yuanchu.limslaboratory.shiro.utils.JwtCredentialsMatcher;
import com.yuanchu.limslaboratory.utils.RedisUtil;
import org.apache.shiro.authc.*;
import org.apache.shiro.authc.credential.CredentialsMatcher;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
@@ -46,12 +44,5 @@
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
        SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
        return info;
    }
    @Override
    public void setCredentialsMatcher(CredentialsMatcher credentialsMatcher) {
        // 设置加密算法
        CredentialsMatcher jwtCredentialsMatcher = new JwtCredentialsMatcher();
        super.setCredentialsMatcher(jwtCredentialsMatcher);
    }
}