@Override
    public boolean shouldMultifactorAuthenticationProviderExecuteInternal(
        final Authentication authentication,
        final RegisteredService registeredService,
        final MultifactorAuthenticationProvider provider,
        final HttpServletRequest request) {
        val principal = resolvePrincipal(authentication.getPrincipal());
        val bypassByAuthn = locateMatchingAttributeBasedOnAuthenticationAttributes(bypassProperties, authentication);
        if (bypassByAuthn) {
            LOGGER.debug("Bypass rules for authentication for principal [{}] indicate the request may be ignored", principal.getId());
            return false;
        }
        val bypassByAuthnMethod = locateMatchingAttributeValue(
            AuthenticationManager.AUTHENTICATION_METHOD_ATTRIBUTE,
            StringUtils.commaDelimitedListToSet(bypassProperties.getAuthenticationMethodName()),
            authentication.getAttributes(), false
        );
        if (bypassByAuthnMethod) {
            LOGGER.debug("Bypass rules for authentication method [{}] indicate the request may be ignored", bypassProperties.getAuthenticationMethodName());
            return false;
        }

        val bypassByHandlerName = locateMatchingAttributeValue(
            AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS,
            StringUtils.commaDelimitedListToSet(bypassProperties.getAuthenticationHandlerName()),
            authentication.getAttributes(), false
        );
        if (bypassByHandlerName) {
            LOGGER.debug("Bypass rules for authentication handlers [{}] indicate the request may be ignored", bypassProperties.getAuthenticationHandlerName());
            return false;
        }

        return true;
    }
Multifactor Bypass Provider based on Authentication.

@author Travis Schmidt
@since 6.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/bypass/AuthenticationMultifactorAuthenticationProviderBypassEvaluator.java