add keycloak authz realm "unit test"
@@ -1391,13 +1391,17 @@ static char * test_authz_worker(request_rec *r) {
rc = oidc_authz_worker24(r, json, require_args, oidc_authz_match_claim);
TST_ASSERT("auth status (8: nested non-array)", rc == AUTHZ_DENIED);
+ require_args = "Require claim realm_access.roles:someRole1";
+ rc = oidc_authz_worker24(r, json, require_args, oidc_authz_match_claim);
+ TST_ASSERT("auth status (9: keycloak sample 1)", rc == AUTHZ_GRANTED);
+
require_args = "Require claim resource_access.someClient.roles:someRole4";
rc = oidc_authz_worker24(r, json, require_args, oidc_authz_match_claim);
- TST_ASSERT("auth status (9: keycloak sample)", rc == AUTHZ_GRANTED);
+ TST_ASSERT("auth status (10: keycloak sample 2)", rc == AUTHZ_GRANTED);
require_args = "Require claim https://test.com/pay:alot";
rc = oidc_authz_worker24(r, json, require_args, oidc_authz_match_claim);
- TST_ASSERT("auth status (10: namespaced key)", rc == AUTHZ_GRANTED);
+ TST_ASSERT("auth status (11: namespaced key)", rc == AUTHZ_GRANTED);
json_decref(json);
