Browse Source

暂时去掉token

dev
jianjun 3 years ago
parent
commit
ab155a9a22
  1. 4
      src/main/java/com/epmet/JimuReportApplication.java
  2. 11
      src/main/java/com/epmet/jmreport/config/JimuReportTokenService.java

4
src/main/java/com/epmet/JimuReportApplication.java

@ -1,7 +1,9 @@
package com.epmet; package com.epmet;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
@ -9,7 +11,7 @@ import org.springframework.core.env.Environment;
* 积木报表独立服务启动类 * 积木报表独立服务启动类
*/ */
@SpringBootApplication @SpringBootApplication
//@EnableAutoConfiguration(exclude={MongoAutoConfiguration.class}) @EnableAutoConfiguration(exclude={MongoAutoConfiguration.class})
public class JimuReportApplication { public class JimuReportApplication {
public static void main(String[] args) { public static void main(String[] args) {

11
src/main/java/com/epmet/jmreport/config/JimuReportTokenService.java

@ -1,18 +1,13 @@
package com.epmet.jmreport.config; package com.epmet.jmreport.config;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI; import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Base64;
import java.util.Map;
/** /**
* 自定义积木报表鉴权(如果不进行自定义则所有请求不做权限控制) * 自定义积木报表鉴权(如果不进行自定义则所有请求不做权限控制)
@ -63,7 +58,9 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
public Boolean verifyToken(String token) { public Boolean verifyToken(String token) {
log.info("JimuReportTokenService#verifyToken :: 接收到token为:{}", token); log.info("JimuReportTokenService#verifyToken :: 接收到token为:{}", token);
//todo 暂时注掉
return true;
/*
if (StringUtils.isBlank(token)) { if (StringUtils.isBlank(token)) {
// 没有token,不样访问 // 没有token,不样访问
return false; return false;
@ -85,7 +82,7 @@ public class JimuReportTokenService implements JmReportTokenServiceI {
return false; return false;
} }
return true; return true;*/
} }
/** /**

Loading…
Cancel
Save