Skip to content

Fixed bug with inAudienceValidationFunction

Latest
Compare
Choose a tag to compare
@justinsa justinsa released this 23 Jun 03:32
· 2 commits to master since this release

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.