protected ExecutableCompiledScript fetchScript(final String mfaScript) throws Exception {
        val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
        if (scriptFactory.isInlineScript(mfaScript) && CasRuntimeHintsRegistrar.notInNativeImage()) {
            return scriptFactory.fromScript(scriptFactory.getInlineScript(mfaScript).orElseThrow());
        }
        if (scriptFactory.isExternalScript(mfaScript)) {
            val scriptPath = SpringExpressionLanguageValueResolver.getInstance()
                .resolve(scriptFactory.getExternalScript(mfaScript).orElseThrow());
            val resource = ResourceUtils.getResourceFrom(scriptPath);
            return scriptFactory.fromResource(resource);
        }
        return null;
    }
This is {@link ScriptedRegisteredServiceMultifactorAuthenticationTrigger}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/mfa/trigger/ScriptedRegisteredServiceMultifactorAuthenticationTrigger.java