|
|
@ -1,5 +1,6 @@
|
|
|
|
package com.wayn.mobile.framework.security.handle;
|
|
|
|
package com.wayn.mobile.framework.security.handle;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.wayn.common.enums.ReturnCodeEnum;
|
|
|
|
import com.wayn.common.util.R;
|
|
|
|
import com.wayn.common.util.R;
|
|
|
|
import com.wayn.common.util.json.JsonUtil;
|
|
|
|
import com.wayn.common.util.json.JsonUtil;
|
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
@ -24,8 +25,8 @@ public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, S
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) {
|
|
|
|
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) {
|
|
|
|
log.error(e.getMessage(), e);
|
|
|
|
// log.error(e.getMessage(), e);
|
|
|
|
int code = HttpStatus.INTERNAL_SERVER_ERROR.value();
|
|
|
|
int code = ReturnCodeEnum.UNAUTHORIZED.getCode();
|
|
|
|
String msg = e.getMessage();
|
|
|
|
String msg = e.getMessage();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
response.setStatus(HttpStatus.OK.value());
|
|
|
|
response.setStatus(HttpStatus.OK.value());
|
|
|
|