Module purpose
This module enables your Odoo database as an OAuth 2.0 authentication server and host multiple API services
Installation
- Install module cs_oauth2_authorization_server.
- Module should be compatible with the your version of Odoo. On install, a window will pop up identifying if the version is not compatible.
- All module dependencies should be available. On install, a window will pop up identifying if there is any missing dependency. You can obtain the missing dependency from Odoo App Store (https://apps.odoo.com/apps/modules/browse?author=Cloudia) or from Cloudia App Store (https://cloudia.systems/shop)
- All python dependencies should be available. On install, a window will pop up identifying if there is any missing dependency. Please install from Shell using 'pip3 install <dependency name>'.
- This module is designed to make these tests before installing itself, so it is safe to perform the above test installation. If all tests are passed, then the module will proceed to install itself.
Module Use
Module Configuration
The Administrator can access and configure the client_id and client_secret parameters for users under menu Settings >> Users & Companies >> Connected Apps
Module Use
Test using Postman: Add URL for one API service hosted in Odoo
Under Authorization, set Type to OAuth 2.0, and Add authorization data to Request Headers
Configure as follows:
A new token can be requested by clicking "Get New Access Token" button and logging into the Odoo database. With the token, the refresh token is also received in response headers and can be accessed programmatically.
The token gets stored under Headers
API service can be accessed using the token
Use refresh token to refetch tokens