Module: kamailio Branch: master Commit: 1cfd694e3bad62e9c4fc31073fcebe7707c5968c URL: https://github.com/kamailio/kamailio/commit/1cfd694e3bad62e9c4fc31073fcebe77...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-10-30T13:27:49+01:00
secsipid: docs for secsipid_sign_prvkey()
---
Modified: src/modules/secsipid/doc/secsipid_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/1cfd694e3bad62e9c4fc31073fcebe77... Patch: https://github.com/kamailio/kamailio/commit/1cfd694e3bad62e9c4fc31073fcebe77...
---
diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml index 97306c649b3..7ea74f525a0 100644 --- a/src/modules/secsipid/doc/secsipid_admin.xml +++ b/src/modules/secsipid/doc/secsipid_admin.xml @@ -460,6 +460,39 @@ request_route { ... } ... +</programlisting> + </example> + </section> + <section id="secsipid.f.secsipid_sign_prvkey"> + <title> + <function moreinfo="none">secsipid_sign_prvkey(sheaders, spaypload, keyData)</function> + </title> + <para> + Build Identity value using the private key given by "keyData" to sign the JWT body. + The sheaders and spayload have to be string representation of JSON + headers and payload to be signed. On success, the Indentity value is + stored in variable $secsipid(val). It also sets $secsipid(ret) to + the return value of the libsecsipid functions. + </para> + <para> + The parameters can contain pseudo-variables. + </para> + <para> + This function can be used from ANY_ROUTE. + </para> + <example> + <title><function>secsipid_sign_prvkey</function> usage</title> + <programlisting format="linespecific"> +... +request_route { + ... + if(secsipid_sign_prvkey("_JSON_HEADERS_", "_JSON_PAYLOAD_", + "_PRIVATE_KEY_")) { + xinfo("Identity value: $secsipid(val)\n"); + } + ... +} +... </programlisting> </example> </section>