private List<Object> getScriptedAttributeValue(final String attributeKey,
                                                   final List<Object> currentValues,
                                                   final AttributeDefinitionResolutionContext context) throws Throwable {
        LOGGER.trace("Locating attribute value via script for definition [{}]", this);

        val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
        
        if (scriptFactory.isInlineScript(getScript())) {
            val input = scriptFactory.getInlineScript(getScript()).orElseThrow();
            return fetchAttributeValueAsInlineGroovyScript(attributeKey, currentValues, input, context);
        }

        val scriptDefinition = SpringExpressionLanguageValueResolver.getInstance().resolve(getScript());
        if (scriptFactory.isExternalScript(scriptDefinition)) {
            val input = scriptFactory.getExternalScript(scriptDefinition).orElseThrow();
            return fetchAttributeValueFromExternalGroovyScript(attributeKey, currentValues, input, context);
        }

        return new ArrayList<>();
    }
This is {@link DefaultAttributeDefinition}.

@author Misagh Moayyed
@author Travis Schmidt
@since 6.2.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/attribute/DefaultAttributeDefinition.java