Commit 49ae7bd5 authored by liqin's avatar liqin 💬

bug fixed

parent 7df89db1
...@@ -50,11 +50,7 @@ public class JwtFilter extends BasicHttpAuthenticationFilter { ...@@ -50,11 +50,7 @@ public class JwtFilter extends BasicHttpAuthenticationFilter {
//if (!isLoginAttempt(request, response) || !executeLogin(request,response)) { //if (!isLoginAttempt(request, response) || !executeLogin(request,response)) {
try { try {
executeLogin(request, response); executeLogin(request, response);
} catch (UnauthorizedException e) { } catch (UnauthorizedException | AuthenticationException e) {
// response403(request,response);
return true;
} catch (AuthenticationException ae) {
// response401(request, response);
return true; return true;
} }
} }
......
...@@ -8,7 +8,7 @@ import org.springframework.web.servlet.ModelAndView; ...@@ -8,7 +8,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
public class MyExceptionResolver implements HandlerExceptionResolver { public class MyHandlerExceptionResolver implements HandlerExceptionResolver {
@Override @Override
public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) { public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) {
......
...@@ -94,7 +94,6 @@ public class ShiroConfig { ...@@ -94,7 +94,6 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/loginByQrCode", "anon"); filterChainDefinitionMap.put("/loginByQrCode", "anon");
filterChainDefinitionMap.put("/doc.html", "anon"); filterChainDefinitionMap.put("/doc.html", "anon");
filterChainDefinitionMap.put("/swagger-ui.html", "anon"); filterChainDefinitionMap.put("/swagger-ui.html", "anon");
filterChainDefinitionMap.put("/asset/download1", "anon");
filterChainDefinitionMap.put("/404", "anon"); filterChainDefinitionMap.put("/404", "anon");
filterChainDefinitionMap.put("/500", "anon"); filterChainDefinitionMap.put("/500", "anon");
......
...@@ -52,7 +52,7 @@ import java.util.Set; ...@@ -52,7 +52,7 @@ import java.util.Set;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/asset") @RequestMapping("/asset")
@Api(tags = {"文件资产操作接口"}) @Api(tags = {"视频文件汇出接口"})
public class AssetController extends BaseController { public class AssetController extends BaseController {
private static final String BASE_STRING = "1234567890abcdef"; private static final String BASE_STRING = "1234567890abcdef";
...@@ -102,7 +102,7 @@ public class AssetController extends BaseController { ...@@ -102,7 +102,7 @@ public class AssetController extends BaseController {
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "idList", value = "视频文件标识ID集合", dataType = "String", paramType = "path") @ApiImplicitParam(name = "idList", value = "视频文件标识ID集合", dataType = "String", paramType = "path")
}) })
@PostMapping("/download") @GetMapping("/download")
@RequiresAuthentication @RequiresAuthentication
public void download(@RequestParam("idList") List<String> idList, HttpServletResponse response) throws IOException { public void download(@RequestParam("idList") List<String> idList, HttpServletResponse response) throws IOException {
response.setContentType("application/octet-stream"); response.setContentType("application/octet-stream");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment