portal 登录码问题修复
This commit is contained in:
parent
afcdcd000c
commit
dafb4ce726
@ -17,7 +17,7 @@ public class GoAccessDeniedHandler implements AccessDeniedHandler{
|
|||||||
@Override
|
@Override
|
||||||
public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException {
|
public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException {
|
||||||
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||||
response.getWriter().print(JSONUtil.parse(CommonResult.unauthorized(accessDeniedException.getMessage())));
|
response.getWriter().print(JSONUtil.parse(CommonResult.forbidden(accessDeniedException.getMessage())));
|
||||||
response.getWriter().flush();
|
response.getWriter().flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ public class GoAuthenticationEntryPoint implements AuthenticationEntryPoint {
|
|||||||
@Override
|
@Override
|
||||||
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
|
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
|
||||||
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||||
response.getWriter().print(JSONUtil.parse(CommonResult.forbidden(authException.getMessage())));
|
response.getWriter().print(JSONUtil.parse(CommonResult.unauthorized(authException.getMessage())));
|
||||||
response.getWriter().flush();
|
response.getWriter().flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ public class GoAuthenticationFailureHandler implements AuthenticationFailureHand
|
|||||||
@Override
|
@Override
|
||||||
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
|
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
|
||||||
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
response.setHeader("Content-Type", "application/json;charset=utf-8");
|
||||||
response.getWriter().print(JSONUtil.parse(CommonResult.failed("登录失败:"+exception.getMessage())));
|
response.getWriter().print(JSONUtil.parse(CommonResult.failed("登录失败,用户名或密码错误!")));
|
||||||
response.getWriter().flush();
|
response.getWriter().flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user