From: Krzysztof B. <kb...@un...> - 2018-12-11 19:57:49
|
Hi Sander, W dniu 10.12.2018 o 07:38, Sander Apweiler pisze: > Hi Krzyzstof, > > we are releasing the entitlement of users as an oauth scope. If the > attribute is multivalued, unity release it as list but if it is single > valued, units releases it as string. Our output translation profile > confiog for this attribute is below. Is there a way to release even > single valued attributes as list of attributes, containing one value? > > Condition: attr contains 'eduPersonEntitlement' > Action: CreateAttribute > attribute name: eduperson_entitlement > expression: attrs['eduPersonEntitlement'] > mandatory: no > attribute displayname: eduPersonEntitlement > attribute description: Group membership expression I was thinking about this and... no idea how to neatly solve this. Profile always produces a list of values for an attribute. Serialization of this to JSON uses a simple logic: if attribute is single-valued then just output it, otherwise output it as a list of values. I think this is a very legitimate use case. But to solve this completely we should have some way to annotate non default serialization to JSON details. Actually not only for attributes created by output profile: for the regular ones we have the same story. Seems as a feature request. Best KB |