protected Map<String, List<Object>> authorizeReleaseOfAllowedAttributes(final Principal principal,
                                                                            final Map<String, List<Object>> attrs,
                                                                            final RegisteredService registeredService,
                                                                            final Service selectedService) {
        val resolvedAttributes = new TreeMap<String, List<Object>>(String.CASE_INSENSITIVE_ORDER);
        resolvedAttributes.putAll(attrs);
        val attributesToRelease = new HashMap<String, List<Object>>();
        /*
         * Map each entry in the allowed list into an array first
         * by the original key, value and the original entry itself.
         * Then process the array to populate the map for allowed attributes
         */
        getAllowedAttributes().forEach((attributeName, value) -> {
            val mappedAttributes = CollectionUtils.wrap(value);
            LOGGER.trace("Attempting to map allowed attribute name [{}]", attributeName);
            val attributeValue = resolvedAttributes.get(attributeName);
            mappedAttributes.forEach(mapped -> {
                val mappedAttributeName = mapped.toString();
                LOGGER.debug("Mapping attribute [{}] to [{}] with value [{}]", attributeName, mappedAttributeName, attributeValue);
                mapSingleAttributeDefinition(attributeName, mappedAttributeName,
                    attributeValue, resolvedAttributes, attributesToRelease);
            });
        });
        return attributesToRelease;
    }
protected Map < String , List < Object > > authorizeReleaseOfAllowedAttributes ( final Principal principal , final Map < String , List < Object > > attrs , final RegisteredService registeredService , final Service selectedService ) { val resolvedAttributes = new TreeMap < String , List < Object > > ( String . CASE_INSENSITIVE_ORDER ) ; resolvedAttributes . putAll ( attrs ) ; val attributesToRelease = new HashMap < String , List < Object > > ( ) ; getAllowedAttributes ( ) . forEach ( ( attributeName , value ) -> { val mappedAttributes = CollectionUtils . wrap ( value ) ; LOGGER . trace ( "Attempting to map allowed attribute name [{}]" , attributeName ) ; val attributeValue = resolvedAttributes . get ( attributeName ) ; mappedAttributes . forEach ( mapped -> { val mappedAttributeName = mapped . toString ( ) ; LOGGER . debug ( "Mapping attribute [{}] to [{}] with value [{}]" , attributeName , mappedAttributeName , attributeValue ) ; mapSingleAttributeDefinition ( attributeName , mappedAttributeName , attributeValue , resolvedAttributes , attributesToRelease ) ; } ) ; } ) ; return attributesToRelease ; }
Authorize release of allowed attributes map.

@param principal         the principal
@param attrs             the attributes
@param registeredService the registered service
@param selectedService   the selected service
@return the map