test: add test when using .aud in jwt-role-claim-key

This commit is contained in:
Taimoor Zaeem
2025-05-10 16:19:22 +00:00
committed by Laurence Isla
parent c5cba11ecb
commit 1609e32c3a
2 changed files with 40 additions and 0 deletions
+18
View File
@@ -196,6 +196,24 @@ roleclaims:
- obj_key: obj_value
expected_status: 401 # fails because it compares an object with a string
jwtaudroleclaims:
- key: '.aud'
data:
aud: postgrest_test_author
expected_status: 200
- key: '.aud'
data:
aud: postgrest_test_invalid
expected_status: 401
- key: '.aud[0]'
data:
aud: [postgrest_test_author]
expected_status: 200
- key: '.aud[1]' # succeeds the aud claims check, but fail when hits the db
data:
aud: [postgrest_test_author, postgrest_test_invalid]
expected_status: 400
invalidroleclaimkeys:
- 'role.other'
- '.role##'