The inAudienceValidationFunction that can be overridden through configuration had a no-op statement that was flattening the array of userRoles instead of mapping the array using the roleToAudienceMapFunction. It now both maps the roles and flattens (one-level deep) the resulting mapped values.
Added support to the inAudience method to work with arrays as arguments instead of just direct string values. You can now call inAudience('A', ['B', 'C'], ['D'])
, which is equivalent to inAudience('A', 'B', 'C', 'D')
. The call will flatten arrays that are one-level deep only.