Hello,

don’t looked into the details, but the kamailio jwt module has a verify 
function (https://www.kamailio.org/docs/modules/stable/modules/jwt.html)

Regarding storage, you can easily store them in a DB table with sqlops, or in 
htable in memory with automatic 24h expiry, just two options. The DB could be 
used from multiple Kamailio servers, htable would be individual per server.

Cheers,

Henning

--
Henning Westerholt – https://skalatan.de/blog/
Kamailio services – https://gilawa.com<https://gilawa.com/>

From: Sergio Charrua via sr-users <[email protected]>
Sent: Dienstag, 27. August 2024 12:58
To: Kamailio (SER) - Users Mailing List <[email protected]>
Cc: Sergio Charrua <[email protected]>
Subject: [SR-Users] Kamailio integration with REST services

Hi all!

I need to integrate a REST Service with Kamailio. Integration is easy, not a 
problem, but my concern is that the REST Services has a JWT token 
authentication required for each request, common to many (it not all) REST 
Services.
So, it is required to POST for authentication (username and password) and once 
I get authentication done, and receive a JWT token, I will need to use this 
token in all other requests to the REST Service. The token is valid for 24h.
My question is:
- how to save the token for use during 24h, on all calls/sessions, without the 
need to authenticate on every call?
- how to detect the token has expired and re-authenticate?

I looked for some modules, but could not find any that suited me.
I am thinking of executing a Python script for this, but concerned about 
latency and PDD....
Any thoughts? Any suggestions? Any known best-practice?


Atenciosamente / Kind Regards / Cordialement / Un saludo,



Sérgio Charrua



__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to