If you make a function call to auth_db, then you create an unnecessary dependency on that module. Copying code is not good. The right solution here would be to create a library that will hold common code for both auth_db and auth_jwt. The library will be automatically loaded by both modules.
Take a look at the db_* modules that are using srdb1 and srdb2 libraries.
Regards, Ovidiu Sas
On Thu, Jan 22, 2015 at 11:11 AM, mading087 notifications@github.com wrote:
Started creating a new module auth_jwt, which supports JSON Web Token for auth. Need to access the database to validate some claims in the token. Wonder if I should just make a function call to auth_db or copy the code from auth_db? Which approach is a better approach? Thanks.
— Reply to this email directly or view it on GitHub https://github.com/kamailio/kamailio/issues/50.
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev