|
@@ -1,6 +1,7 @@
|
|
package com.lantone.userauth.exception;
|
|
package com.lantone.userauth.exception;
|
|
|
|
|
|
import com.lantone.common.api.CommonResult;
|
|
import com.lantone.common.api.CommonResult;
|
|
|
|
+import org.springframework.security.authentication.DisabledException;
|
|
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
|
|
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;
|
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
|
@@ -15,8 +16,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
public class Oauth2ExceptionHandler {
|
|
public class Oauth2ExceptionHandler {
|
|
|
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
- @ExceptionHandler(value = OAuth2Exception.class)
|
|
|
|
- public CommonResult handleOauth2(OAuth2Exception e) {
|
|
|
|
|
|
+ @ExceptionHandler(value = Exception.class)
|
|
|
|
+ public CommonResult handleOauth2(Exception e) {
|
|
return CommonResult.failed(e.getMessage());
|
|
return CommonResult.failed(e.getMessage());
|
|
}
|
|
}
|
|
|
|
|