[sr-dev] [kamailio/kamailio] jwt: token may have a validity period (number of seconds) (#2722)

Daniel-Constantin Mierla notifications at github.com
Mon May 3 10:35:20 CEST 2021


As a generic, but important remark: whenever you make a pull request, first do a rebase and a fast-forward of the origin in your branch, otherwise older commits and unrelated show up in the pull requests. Like you see above commits related to cplc or pua_dialoginfo module.

Regarding the jwt commit, thanks for contributing, however I pushed a different approach to allow setting any numeric claims (grants). The jwt specs list other reserved names like not-before (nbf) with numeric values and actually there can be any other name with numeric values.

The `exp` can be added like:

```
$var(exp) = $Ts + 600;
jwt_generate("/path/to/prvkey.pem", "RS256",
        "exp=$var(exp);caller='$fU';callee='$tU';callid='$ci'");
```

The README has more details about parameters format.

-- 
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#issuecomment-831112348
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210503/1a5d428e/attachment.htm>


More information about the sr-dev mailing list