JSON-RPC User Key
by Alexandre Díaz (Aloxa Solucións S.L.) <alex@aloxa.eu> https://www.eiqui.com
Odoo
Availability |
Odoo Online
Odoo.sh
On Premise
|
Odoo Apps Dependencies |
Social Network (mail)
|
Technical Name |
jsonrpc_keys |
License | AGPL-3 |
Website | https://www.eiqui.com |
JSON-RPC User Key
Secure anonymous json-rpc calls
JSON-RPC User Key implements a simplified authentification in anonymous json-rpc calls. Combined with "sudo()" you can do operations with the identified user.
1. Create the key

2. Use in your json-rpc controller

3. Call to the JSON-RPC resource
{ "jsonrpc": "2.0", "id": 1234, "method": "call", "params": { "key":"e4e7e4927f5273ad840ab4668fadf9bed00fd822c3841181d8d46df0b1d4f7dc", "message": "This is a test!" } }
Information
- The key isn't sent to the controller.
- The controller only is called if the "check_key" procress finish normally (user identified).
- Only can be used with JSON-RPC controllers... 'http' will cause an exception.
- Keys without routes are available on all json-rpc calls.
Issues
If you get:
raise osv.except_osv(_('Invalid Action!'), _("Unable to send email, please configure the sender's email address or alias.")) except_orm: (u'Invalid Action!', u"Unable to send email, please configure the sender's email address or alias.")Check that email of the 'partner' associated to the 'user' is not empty.

Please log in to comment on this module