@Override
    public Map<String, List<Object>> map(final AttributeMappingRequest request) {
        val scriptFactoryInstance = ExecutableCompiledScriptFactory.findExecutableCompiledScriptFactory();
        if (scriptFactoryInstance.isPresent()) {
            val scriptFactory = scriptFactoryInstance.get();
            if (scriptFactory.isInlineScript(request.getMappedAttributeName())) {
                val inlineGroovy = scriptFactory.getInlineScript(request.getMappedAttributeName()).orElseThrow();
                return fetchAttributeValueAsInlineGroovyScript(request.getAttributeName(), request.getResolvedAttributes(), inlineGroovy);
            }
            if (scriptFactory.isExternalScript(request.getMappedAttributeName())) {
                val file = scriptFactory.getExternalScript(request.getMappedAttributeName()).orElseThrow();
                return fetchAttributeValueFromExternalGroovyScript(request.getAttributeName(), request.getResolvedAttributes(), file);
            }
        }
        return mapSimpleSingleAttributeDefinition(request);
    }
This is {@link DefaultPrincipalAttributesMapper}.

@author Misagh Moayyed
@since 6.6.0
core/cas-server-core-authentication-attributes/src/main/java/org/apereo/cas/authentication/DefaultPrincipalAttributesMapper.java