protected static boolean locateMatchingAttributeValue(final String attrName,
                                                          final Set<String> attrValue,
                                                          final Map<String, List<Object>> attributes,
                                                          final boolean matchIfNoValueProvided) {
        LOGGER.debug("Locating matching attribute [{}] with value [{}] amongst the attribute collection [{}]", attrName, attrValue, attributes);
        if (StringUtils.isBlank(attrName)) {
            LOGGER.debug("Failed to match since attribute name is undefined");
            return false;
        }

        val names = locateMatchingAttributeName(attributes, attrName);
        if (names.isEmpty()) {
            return false;
        }

        if (attrValue == null || attrValue.isEmpty()) {
            LOGGER.debug("No attribute value to match is provided; Match result is set to [{}]", matchIfNoValueProvided);
            return matchIfNoValueProvided;
        }

        val values = names
            .entrySet()
            .stream()
            .filter(e -> {
                val allValues = CollectionUtils.toCollection(e.getValue());
                LOGGER.debug("Matching attribute [{}] with values [{}] against [{}]", e.getKey(), allValues, attrValue);
                return RegexUtils.findFirst(attrValue, allValues).isPresent();
            }).collect(Collectors.toSet());

        LOGGER.debug("Matching attribute values remaining are [{}]", values);
        return !values.isEmpty();
    }
This is {@link BaseMultifactorAuthenticationProviderBypassEvaluator}.

@author Misagh Moayyed
@since 6.1.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/bypass/BaseMultifactorAuthenticationProviderBypassEvaluator.java