Browse Source

暂时关闭tokenAuth

gaodm 4 years ago
parent
commit
c2c5a83f2c

+ 3 - 3
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -89,9 +89,9 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/plan/getSysPlanInfoDatas").permitAll()
                 .antMatchers("/sys/mrqc/analyze_run").permitAll()
                 .antMatchers("/sys/tokenPermission/delPermission").permitAll()
-                        .antMatchers("/sys/tokenPermission/getPermission").permitAll()
-                .antMatchers("/push/push").permitAll()
-                .antMatchers("/push/indicationPush").permitAll()
+                .antMatchers("/sys/tokenPermission/getPermission").permitAll()
+                .antMatchers("/sys/push/push").permitAll()
+                .antMatchers("/sys/push/indicationPush").permitAll()
                 .antMatchers("/**").authenticated();
 //                .antMatchers("/**").permitAll();
     }

+ 2 - 2
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -133,8 +133,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/mrqc/analyze_run", request)
                 || matchers("/sys/tokenPermission/delPermission", request)
                 || matchers("/sys/tokenPermission/getPermission", request)
-                || matchers("/push/push", request)
-                || matchers("/push/indicationPush", request)
+                || matchers("/sys/push/push", request)
+                || matchers("/sys/push/indicationPush", request)
                 || matchers("/", request)) {
             return true;
         }

+ 3 - 0
src/main/java/com/diagbot/web/PushController.java

@@ -1,6 +1,7 @@
 package com.diagbot.web;
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.annotation.TokenAuth;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.PushCoreDTO;
 import com.diagbot.dto.RespDTO;
@@ -33,6 +34,7 @@ public class PushController {
     @ApiOperation(value = "基础推理[by:zhaops]", notes = "")
     @PostMapping("/push")
     @SysLogger("push")
+    @TokenAuth
     public RespDTO<PushCoreDTO> push(@RequestBody @Valid PushVO pushVO) {
         PushCoreDTO data = pushFacade.push(pushVO);
         return RespDTO.onSuc(data);
@@ -41,6 +43,7 @@ public class PushController {
     @ApiOperation(value = "开单合理项推理[by:zhaops]", notes = "")
     @PostMapping("/indicationPush")
     @SysLogger("indicationPush")
+    @TokenAuth
     public RespDTO<IndicationDTO> indicationPush(@RequestBody @Valid IndicationPushVO indicationPushVO) {
         IndicationDTO data = pushFacade.indicationPush(indicationPushVO);
         return RespDTO.onSuc(data);

+ 1 - 1
src/main/resources/application-dev.yml

@@ -167,7 +167,7 @@ swagger:
 
 #Token鉴权
 tokenAuth:
-  enable: true
+  enable: false
 
 #病历质控地址
 mrqc:

+ 1 - 1
src/main/resources/application-local.yml

@@ -167,7 +167,7 @@ swagger:
 
 #Token鉴权
 tokenAuth:
-  enable: true
+  enable: false
 
 #病历质控地址
 mrqc: