@Override
    public boolean shouldMultifactorAuthenticationProviderExecuteInternal(final Authentication authentication,
                                                                          final RegisteredService registeredService,
                                                                          final MultifactorAuthenticationProvider provider,
                                                                          final HttpServletRequest request) {
        return watchableScript != null && FunctionUtils.doAndHandle(() -> {
            val principal = resolvePrincipal(authentication.getPrincipal());
            LOGGER.debug("Evaluating multifactor authentication bypass properties for principal [{}], "
                         + "service [{}] and provider [{}] via Groovy script [{}]",
                principal.getId(), registeredService, provider, watchableScript);
            val args = new Object[]{authentication, principal, registeredService, provider, LOGGER, request};
            return watchableScript.execute(args, Boolean.class);
        }, e -> true).get();

    }
This is {@link GroovyMultifactorAuthenticationProviderBypassEvaluator}.

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