package cn.mb.cloud.auth.security.exception; import cn.mb.cloud.auth.security.component.MbCloudAuth2ExceptionSerializer; import com.fasterxml.jackson.databind.annotation.JsonSerialize; import org.springframework.http.HttpStatus; /** * @author jason */ @JsonSerialize(using = MbCloudAuth2ExceptionSerializer.class) public class UnauthorizedException extends MbCloudAuth2Exception { public UnauthorizedException(String msg, Throwable t) { super(msg); } @Override public String getOAuth2ErrorCode() { return "unauthorized"; } @Override public int getHttpErrorCode() { return HttpStatus.UNAUTHORIZED.value(); } }