Browse code

modules: readme files regenerated - secsipid ... [skip ci]

Kamailio Dev authored on 21/06/2021 06:16:23
Showing 1 changed files
... ...
@@ -45,6 +45,8 @@ Daniel-Constantin Mierla
45 45
               4.6. secsipid_build_identity(origTN, destTN, attest, origID,
46 46
                       x5u, keyPath)
47 47
 
48
+              4.7. secsipid_sign(sheaders, spaypload, keyPath)
49
+
48 50
         5. Installation
49 51
 
50 52
    List of Examples
... ...
@@ -61,7 +63,8 @@ Daniel-Constantin Mierla
61 63
    1.10. secsipid_get_url usage
62 64
    1.11. secsipid_add_identity usage
63 65
    1.12. secsipid_build_identity usage
64
-   1.13. Libsecsipid Usage
66
+   1.13. secsipid_sign usage
67
+   1.14. Libsecsipid Usage
65 68
 
66 69
 Chapter 1. Admin Guide
67 70
 
... ...
@@ -94,6 +97,8 @@ Chapter 1. Admin Guide
94 97
         4.6. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
95 98
                 keyPath)
96 99
 
100
+        4.7. secsipid_sign(sheaders, spaypload, keyPath)
101
+
97 102
    5. Installation
98 103
 
99 104
 1. Overview
... ...
@@ -227,6 +232,8 @@ modparam("secsipid", "libopt", "CacheExpires=0")
227 232
    4.6. secsipid_build_identity(origTN, destTN, attest, origID, x5u,
228 233
           keyPath)
229 234
 
235
+   4.7. secsipid_sign(sheaders, spaypload, keyPath)
236
+
230 237
 4.1.  secsipid_check_identity(keyPath)
231 238
 
232 239
    Check the validity of the Identity header using the keys stored in the
... ...
@@ -376,6 +383,30 @@ request_route {
376 383
 }
377 384
 ...
378 385
 
386
+4.7.  secsipid_sign(sheaders, spaypload, keyPath)
387
+
388
+   Build Identity value using the key specified by "keyPath" to sign the
389
+   JWT body. The sheaders and spayload have to be string representation of
390
+   JSON headers and payload to be signed. On success, the Indentity value
391
+   is stored in variable $secsipid(val). It also sets $secsipid(ret) to
392
+   the return value of the libsecsipid functions.
393
+
394
+   The parameters can contain pseudo-variables.
395
+
396
+   This function can be used from ANY_ROUTE.
397
+
398
+   Example 1.13. secsipid_sign usage
399
+...
400
+request_route {
401
+    ...
402
+    if(secsipid_sign("_JSON_HEADERS_", "_JSON_PAYLOAD_",
403
+            "/secsipid/$rd/key.pem")) {
404
+        xinfo("Identity value: $secsipid(val)\n");
405
+    }
406
+    ...
407
+}
408
+...
409
+
379 410
 5. Installation
380 411
 
381 412
    The module needs "secsipdi_proc.so" module that depends on
... ...
@@ -390,7 +421,7 @@ request_route {
390 421
    installed and its environment configured, then run the following
391 422
    commands:
392 423
 
393
-   Example 1.13. Libsecsipid Usage
424
+   Example 1.14. Libsecsipid Usage
394 425
 ...
395 426
 export GO111MODULE=off
396 427
 go get https://github.com/asipto/secsipidx