* avoid sql injections
* linter
* fix test using random sid
* add some test cases
* remove tests that don't use the new validation
* add test
* linter
* fix tests
* add test
---------
Co-authored-by: Guilherme Rauen <g.rauen@cognigy.com>
* user will always be attached to SP, thus always provide SP sid
* add another fallback for service_provider_sid
* fix the email and username check in user creation that was crashing the server
* not allow same names for shared and account carriers
Co-authored-by: eglehelms <e.helms@cognigy.com>
* initial changes for jwt auth
* return permissions as an array of string
* Add JWT expiration environment variable (#74)
* allow fromHost in createCall REST API
* add JWT_EXPIRES_IN=<mins> env variable, 60 mins by default
* add jwt expiration in register.js and signin.js
* fix tests - add permissions and scope to encoded obj in jwt
Co-authored-by: Dave Horton <daveh@beachdognet.com>
Co-authored-by: eglehelms <e.helms@cognigy.com>
* return only the jwt-token in the api response
* update swagger.yaml
* add /users api
* apply review comments
* add users test case
* added User model
* bugfix: admin user should be able to create a carrier for a service provider
Co-authored-by: EgleH <egle.helms@gmail.com>
Co-authored-by: eglehelms <e.helms@cognigy.com>