private boolean checkKey(final ServerWebExchange exchange, final String keyName, final String key) {
        HttpHeaders httpHeaders = exchange.getRequest().getHeaders();
        if (StringUtils.equals(httpHeaders.getFirst(keyName), key)) {
            return true;
        }
        MultiValueMap<String, String> multiValueMap = exchange.getRequest().getQueryParams();
        return StringUtils.equals(multiValueMap.getFirst(keyName), key);
    }
Check the key.
@param exchange exchange
@param keyName key attribute name
@param key key
@return whether the key is correct.
shenyu-plugin/shenyu-plugin-security/shenyu-plugin-key-auth/src/main/java/org/apache/shenyu/plugin/key/auth/KeyAuthPlugin.java