When trying to set multiple audiences from variables it wasn't working before, as the variable expansion (which resulted in String[]) was not compatible with the conversion to List<String> as expected by nimbus.
Changes done:
Moved the variable expansion before the splitting. If the expansion already returns an array, keep it, only split the string if it is actually a plain string
Changed the calls to nimbus to always use lists instead of arrays, as it prefers lists
Fixed the test, as they weren't run (map does not terminate a lazy stream meaning it didn't run, forEach does however)
Also added more test cases to the tests (checking variable expansion/plain string, checking using audience vs claim_aud and checkin the different error conditions)
When trying to set multiple audiences from variables it wasn't working before, as the variable expansion (which resulted in
String[]
) was not compatible with the conversion toList<String>
as expected by nimbus.Changes done:
map
does not terminate a lazy stream meaning it didn't run,forEach
does however)