|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ruoyi.gateway.filter;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.lang.Dict;
|
|
|
|
|
import com.ruoyi.common.core.utils.JsonUtils;
|
|
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
|
|
import com.ruoyi.gateway.config.properties.CaptchaProperties;
|
|
|
|
@ -16,7 +17,6 @@ import reactor.core.publisher.Flux;
|
|
|
|
|
|
|
|
|
|
import java.nio.CharBuffer;
|
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.concurrent.atomic.AtomicReference;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -50,8 +50,8 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object> {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
String rspStr = resolveBodyFromRequest(request);
|
|
|
|
|
Map<String, String> obj = JsonUtils.parseMap(rspStr);
|
|
|
|
|
validateCodeService.checkCaptcha(obj.get(CODE), obj.get(UUID));
|
|
|
|
|
Dict obj = JsonUtils.parseMap(rspStr);
|
|
|
|
|
validateCodeService.checkCaptcha(obj.getStr(CODE), obj.getStr(UUID));
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return WebFluxUtils.webFluxResponseWriter(exchange.getResponse(), e.getMessage());
|
|
|
|
|
}
|
|
|
|
|