private static List<Object> fetchAttributeValueFromScript(final ExecutableCompiledScript scriptToExec,
                                                              final String attributeKey,
                                                              final List<Object> currentValues,
                                                              final AttributeDefinitionResolutionContext context) throws Throwable {
        val args = CollectionUtils.<String, Object>wrap("attributeName", Objects.requireNonNull(attributeKey),
            "attributeValues", currentValues, "logger", LOGGER,
            "registeredService", context.getRegisteredService(),
            "attributes", context.getAttributes());
        scriptToExec.setBinding(args);
        return scriptToExec.execute(args.values().toArray(), List.class);
    }
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