فهرست منبع

token过期code区分

gao.qiang 2 سال پیش
والد
کامیت
d7e32995c1

+ 2 - 0
base-framework/src/main/java/com/ozs/framework/security/handle/AuthenticationEntryPointImpl.java

@@ -64,6 +64,8 @@ public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, S
                 String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源"+format1, request.getRequestURI());
                 ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg)));
             }catch (Exception exception){
+                String msg = StringUtils.format("token已过期", request.getRequestURI());
+                ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(402, msg)));
             }
         }
     }