Module: kamailio
Branch: master
Commit: 2058676daacc2feded18b872bd53c0514710d4bb
URL: https://github.com/kamailio/kamailio/commit/2058676daacc2feded18b872bd53c05…
Author: Kamailio Dev <kamailio.dev(a)kamailio.org>
Committer: Kamailio Dev <kamailio.dev(a)kamailio.org>
Date: 2021-05-03T11:16:14+02:00
modules: readme files regenerated - lost ... [skip ci]
---
Modified: src/modules/lost/README
---
Diff: https://github.com/kamailio/kamailio/commit/2058676daacc2feded18b872bd53c05…
Patch: https://github.com/kamailio/kamailio/commit/2058676daacc2feded18b872bd53c05…
---
diff --git a/src/modules/lost/README b/src/modules/lost/README
index 14cf3b36a6..00fa5f2ceb 100644
--- a/src/modules/lost/README
+++ b/src/modules/lost/README
@@ -376,8 +376,15 @@ r(pidf)\n");
* pidf-lo - the PIDF-LO returned in the HELD locationRequest response
* error - any error code returned in the HELD response
- The return value is 200 on success, 400 if an internal error occured,
- or 500 if an error code is returned in the HELD response.
+ The return value is 200..203 on success, 400 if an internal error
+ occured, or 500 if an error code is returned in the HELD response.
+ Success codes in detail are as follows:
+ * 200 - received 200 OK, but neither location-info nor locationURI
+ element found
+ * 201 - received 200 OK with locationURI (aka Location-by-Reference)
+ * 202 - received 200 OK with location-info element (aka
+ Location-by-Value)
+ * 203 - received 200 OK with location-info and locationURI element
This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE,
FAILURE_ROUTE, and BRANCH_ROUTE.
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [x ] Commit message has the format required by CONTRIBUTING guide
- [ x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x ] Each component has a single commit (if not, squash them into one commit)
- [x ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [x ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x ] PR should be backported to stable branches
- [x ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Add a new parameter validity to jwt_generate(prvkey, alg, claims) in order to set a validity period for generated jwt token.
I know branch 5.5 is almost released but I think that this functionality is very important for this new module and I hope it can be added to this release.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2722
-- Commit Summary --
* cplc: add a configuration route before redirected call (key: redirect_route)
* pua_dialoginfo: disable publish notifications for subsequent requests (key: publish_dialog_req_within)
* Merge branch 'master' of https://github.com/kamailio/kamailio
* jwt: token may have a validity period (number of seconds)
-- File Changes --
M src/modules/jwt/doc/jwt.xml (9)
M src/modules/jwt/doc/jwt_admin.xml (5)
M src/modules/jwt/jwt_mod.c (17)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2722.patchhttps://github.com/kamailio/kamailio/pull/2722.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2722
Module: kamailio
Branch: master
Commit: ae13686c80b03693ee2195d38a8c8eb0ede0d0dc
URL: https://github.com/kamailio/kamailio/commit/ae13686c80b03693ee2195d38a8c8eb…
Author: Wolfgang Kampichler <dev(a)kampichler.info>
Committer: Wolfgang Kampichler <dev(a)kampichler.info>
Date: 2021-05-03T11:00:41+02:00
lost: lost_held_dereference() documentation added and code comment corrected
---
Modified: src/modules/lost/doc/lost_admin.xml
Modified: src/modules/lost/response.c
---
Diff: https://github.com/kamailio/kamailio/commit/ae13686c80b03693ee2195d38a8c8eb…
Patch: https://github.com/kamailio/kamailio/commit/ae13686c80b03693ee2195d38a8c8eb…
---
diff --git a/src/modules/lost/doc/lost_admin.xml b/src/modules/lost/doc/lost_admin.xml
index 7f4597632b..f8065770d9 100644
--- a/src/modules/lost/doc/lost_admin.xml
+++ b/src/modules/lost/doc/lost_admin.xml
@@ -429,9 +429,23 @@ xlog("L_INFO", "HELD locationRequest: Result code $var(res)\nUrl: $var(url)\n$va
</para></listitem>
</itemizedlist>
<para>
- The return value is 200 on success, 400 if an internal error occured, or 500 if an
- error code is returned in the HELD response.
+ The return value is 200..203 on success, 400 if an internal error occured, or 500 if an
+ error code is returned in the HELD response. Success codes in detail are as follows:
</para>
+ <itemizedlist>
+ <listitem><para>
+ <emphasis>200</emphasis> - received 200 OK, but neither location-info nor locationURI element found
+ </para></listitem>
+ <listitem><para>
+ <emphasis>201</emphasis> - received 200 OK with locationURI (aka Location-by-Reference)
+ </para></listitem>
+ <listitem><para>
+ <emphasis>202</emphasis> - received 200 OK with location-info element (aka Location-by-Value)
+ </para></listitem>
+ <listitem><para>
+ <emphasis>203</emphasis> - received 200 OK with location-info and locationURI element
+ </para></listitem>
+ </itemizedlist>
<para>
This function can be used from REQUEST_ROUTE,
ONREPLY_ROUTE, FAILURE_ROUTE, and BRANCH_ROUTE.
diff --git a/src/modules/lost/response.c b/src/modules/lost/response.c
index caa86732ed..cc6d65ad2a 100644
--- a/src/modules/lost/response.c
+++ b/src/modules/lost/response.c
@@ -1006,8 +1006,8 @@ p_lost_fsr_t lost_parse_findServiceResponse(str ret)
* lost_check_HeldResponse(node)
* does a quick check of HELD dereference response and returns ...
* 0: neither location value nor reference found
- * 1: location value found
- * 2: location reference found
+ * 1: location reference found
+ * 2: location value found
* 3: location value and reference found
* multiple occurences are ignored
*/
Module: kamailio
Branch: 5.5
Commit: f76512226f8db95b7ecd8c881475e2f53f2aa900
URL: https://github.com/kamailio/kamailio/commit/f76512226f8db95b7ecd8c881475e2f…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-05-03T09:45:02+02:00
jwt: more details about claims parameter format
(cherry picked from commit 7d24a7afe02bf1f7c8ddddfcfc9f1c287296c996)
---
Modified: src/modules/jwt/doc/jwt_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/f76512226f8db95b7ecd8c881475e2f…
Patch: https://github.com/kamailio/kamailio/commit/f76512226f8db95b7ecd8c881475e2f…
---
diff --git a/src/modules/jwt/doc/jwt_admin.xml b/src/modules/jwt/doc/jwt_admin.xml
index dba928b523..36d3d0d0f7 100644
--- a/src/modules/jwt/doc/jwt_admin.xml
+++ b/src/modules/jwt/doc/jwt_admin.xml
@@ -109,6 +109,10 @@ modparam("jwt", "key_mode", 1)
<para>
claims - the list of claims to be added to JWT, in the format
"name1=value1;name2=value2;..." (same as the SIP parameters format).
+ The string values can be enclosed in single or double quotes. If a
+ value is not eclosed in between quotes, it is added as numeric
+ value if it is successfully converted to a long value, otherwise is
+ added as string value.
</para>
</listitem>
</itemizedlist>
@@ -120,7 +124,7 @@ modparam("jwt", "key_mode", 1)
<programlisting format="linespecific">
...
jwt_generate("/path/to/prvkey.pem", "RS256",
- "caller=$fU;callee=$tU;callid=$ci");
+ "caller='$fU';callee='$tU';callid='$ci';index=100");
...
</programlisting>
</example>
@@ -151,7 +155,8 @@ modparam("jwt", "key_mode", 1)
<listitem>
<para>
claims - the list of claims to be checked they are in the JWT, in the format
- "name1=value1;name2=value2;..." (same as the SIP parameters format).
+ "name1=value1;name2=value2;..." (same as the SIP parameters format,
+ see also the description of claims parameter for jwt_generate()).
</para>
</listitem>
<listitem>
@@ -168,7 +173,7 @@ modparam("jwt", "key_mode", 1)
<programlisting format="linespecific">
...
if(!jwt_verify("/path/to/pubkey.pem", "RS256",
- "caller=$fU;callee=$tU;callid=$ci",
+ "caller='$fU';callee='$tU';callid='$ci';index=100",
"$var(jwt)") {
xwarn("failed to verify jwt\n");
}
@@ -206,7 +211,7 @@ modparam("jwt", "key_mode", 1)
<programlisting format="linespecific">
...
jwt_generate("/path/to/prvkey.pem", "RS256",
- "caller=$fU;callee=$tU;callid=$ci");
+ "caller='$fU';callee='$tU';callid='$ci';index=100");
xinfo("jwt is: $jwt(val)");
...
</programlisting>