[sr-dev] git:master:a5997c29: secsipid: docs for secsipid_sign()

Daniel-Constantin Mierla miconda at gmail.com
Mon Jun 21 08:12:58 CEST 2021


Module: kamailio
Branch: master
Commit: a5997c29468efabb5a7745bc5b1c99c0f9eb8999
URL: https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c0f9eb8999

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-21T08:12:15+02:00

secsipid: docs for secsipid_sign()

---

Modified: src/modules/secsipid/doc/secsipid_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c0f9eb8999.diff
Patch: https://github.com/kamailio/kamailio/commit/a5997c29468efabb5a7745bc5b1c99c0f9eb8999.patch

---

diff --git a/src/modules/secsipid/doc/secsipid_admin.xml b/src/modules/secsipid/doc/secsipid_admin.xml
index 28f3dce68a..cc9c6c9fdf 100644
--- a/src/modules/secsipid/doc/secsipid_admin.xml
+++ b/src/modules/secsipid/doc/secsipid_admin.xml
@@ -397,6 +397,39 @@ request_route {
     ...
 }
 ...
+</programlisting>
+		</example>
+	</section>
+	<section id="secsipid.f.secsipid_sign">
+		<title>
+		<function moreinfo="none">secsipid_sign(sheaders, spaypload, keyPath)</function>
+		</title>
+		<para>
+			Build Identity value using the key specified by "keyPath" 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</function> usage</title>
+		<programlisting format="linespecific">
+...
+request_route {
+    ...
+    if(secsipid_sign("_JSON_HEADERS_", "_JSON_PAYLOAD_",
+            "/secsipid/$rd/key.pem")) {
+        xinfo("Identity value: $secsipid(val)\n");
+    }
+    ...
+}
+...
 </programlisting>
 		</example>
 	</section>




More information about the sr-dev mailing list