Commit 1f4a3ca1 authored by liqin's avatar liqin 💬

bug fixed

parent 8d57a51e
......@@ -21,6 +21,7 @@ import java.io.IOException;
/**
* oauth2过滤器
*
* @author 86187
*/
@Slf4j
......@@ -68,6 +69,9 @@ public class AuthFilter extends AuthenticatingFilter {
*/
@Override
protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws Exception {
if (isLoginRequest(request, response) || isEnabled(request, response)) {
return true;
} else {
//获取请求token,如果token不存在,直接返回40101
String token = getRequestToken((HttpServletRequest) request);
if (StringUtils.isBlank(token)) {
......@@ -84,6 +88,7 @@ public class AuthFilter extends AuthenticatingFilter {
httpResponse.getWriter().print(json);
return false;
}
}
return executeLogin(request, response);
}
......
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