Module: kamailio Branch: master Commit: e5e90926b15d716b542c25a726dd746ed358b35b URL: https://github.com/kamailio/kamailio/commit/e5e90926b15d716b542c25a726dd746ed358b35b
Author: Federico Cabiddu <[email protected]> Committer: Federico Cabiddu <[email protected]> Date: 2026-07-06T10:19:01+02:00 jwt3: support inline JWKS JSON string as key parameter --- Modified: src/modules/jwt3/jwt3_mod.c --- Diff: https://github.com/kamailio/kamailio/commit/e5e90926b15d716b542c25a726dd746ed358b35b.diff Patch: https://github.com/kamailio/kamailio/commit/e5e90926b15d716b542c25a726dd746ed358b35b.patch --- diff --git a/src/modules/jwt3/jwt3_mod.c b/src/modules/jwt3/jwt3_mod.c index 834f98deaa2..86dc65beb40 100644 --- a/src/modules/jwt3/jwt3_mod.c +++ b/src/modules/jwt3/jwt3_mod.c @@ -476,7 +476,11 @@ static jwk_set_t *jwt_load_keys(str *key_in) char *dot_last = strrchr(key_in->s, '.'); jwk_set_t *jwks = NULL; - if(!dot) { + if(key_in->s[0] == '{') { + /* inline JWKS JSON */ + LM_DBG("Starts with '{'. Treating as inline JWKS JSON.\n"); + jwks = jwks_load(NULL, key_in->s); + } else if(!dot) { /* raw PEM (content) */ LM_DBG("No dot found. Treating as Raw PEM content.\n"); char *json = jwt_raw_to_jwks(key_in->s, key_in->len, "legacy-raw"); _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
