@Override
    public Object convert(final Object attribute) {
        if (script != null) {
            return FunctionUtils.doUnchecked(() -> {
                val args = CollectionUtils.wrap("attribute", attribute, "logger", LOGGER);
                script.setBinding(args);
                return script.execute(args.values().toArray(), Object.class, false);
            });
        }
        return attribute;
    }
This is {@link GroovyAttributeConverter}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-pac4j-core-clients/src/main/java/org/apereo/cas/support/pac4j/authentication/attributes/GroovyAttributeConverter.java