protected boolean isAcceptableX509Attribute(final UserProfile profile, final String pattern, final String attribute) {
        return FunctionUtils.doIfNotBlank(pattern,
            () -> {
                val values = CollectionUtils.toCollection(profile.getAttribute(attribute));
                return !values.isEmpty() && values.stream().anyMatch(email -> RegexUtils.find(pattern, email.toString()));
            },
            () -> Boolean.TRUE);
    }
This is {@link OAuth20X509Authenticator}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oauth-core-api/src/main/java/org/apereo/cas/support/oauth/authenticator/OAuth20X509Authenticator.java