reactive-interaction-gateway
reactive-interaction-gateway copied to clipboard
Added support for array of values in JWT claims in auto-subscription
Description
Attempting to fix issue #381 @kevinbader
This change checks for the claims value type. If the JWT claim value from the json_pointer is an array of strings(E.g. {Roles: ["Administrator", "User"]}), it will construct a subscription with multiple entries(E.g. {...,"oneOf":[{"userType":"Administrator"},{"userType":"User"}]}],...}).
Closes #381
Nice work! Even though JSON pointer for some reason has no way of pointing to any value within an array rather than the array itself, I think this is a good, pragmatic solution. What left to do before merging this:
- fixing the linting error (see pipeline run)
- fixing the existing tests
- adding a new test for this to /lib/rig/subscriptions/parser/jwt_test.exs
- adding an entry to the CHANGELOG.md file
Could you please add that to this PR?