| ... | @@ -6,7 +6,7 @@ This plugin connects WordPress with Odoo in a bidirectional way. The idea behind |
... | @@ -6,7 +6,7 @@ This plugin connects WordPress with Odoo in a bidirectional way. The idea behind |
|
|
|
|
|
|
|
## **How does it work?**
|
|
## **How does it work?**
|
|
|
|
|
|
|
|
The plugin informs the `Authorization: <odoo-api-token>` and `Accept-Language: <wp-current-lang>` headers on the each http requests made from WordPress to Odoo. The `odoo-api-token` value have to be declared on the admin `settings/wpct-odoo-connect` pannel. With this middleware strategy, WordPress can be authorized to perform CRUD operations on the backend.
|
|
The plugin informs the `Authorization: <odoo-api-token>` and `Accept-Language: <wp-current-lang>` headers on the each http requests made from WordPress to Odoo, intercepted with the custom filter `wpct_forms_set_headers`. The `odoo-api-token` value have to be declared on the admin `settings/wpct-odoo-connect` pannel. The `wp-current-lang` is recovered from the [WMPL](https://wpml.org/) plugin. With this middleware strategy, WordPress can be authorized to perform CRUD operations on the backend.
|
|
|
|
|
|
|
|
On the other hand, the plugins installs the [JWT Authentication for WP REST API plugin](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) plugin to open a new namespace on the **WP Rest API** with multiple endpoints. Throug this new endpoints, Odoo can authenticate and get api keys to perform CRUD operations against WordPress. To achive this, Odoo have to know the username and password of an existing user on the WordPress instance.
|
|
On the other hand, the plugins installs the [JWT Authentication for WP REST API plugin](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) plugin to open a new namespace on the **WP Rest API** with multiple endpoints. Throug this new endpoints, Odoo can authenticate and get api keys to perform CRUD operations against WordPress. To achive this, Odoo have to know the username and password of an existing user on the WordPress instance.
|
|
|
|
|
|
| ... | @@ -17,6 +17,4 @@ For more information about Wordpress REST API see the [official documentation](h |
... | @@ -17,6 +17,4 @@ For more information about Wordpress REST API see the [official documentation](h |
|
|
|
|
|
|
|
### **Wordpress REST API Authentication dependecies**
|
|
### **Wordpress REST API Authentication dependecies**
|
|
|
|
|
|
|
|
[Check plugins dependencies](https://waclaw.blog/check-wordpress-plugin-dependencies/)
|
|
To support api token based authentication on WordPress, this plugins has [JWT Authentication for WP REST API plugin](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) as dependency. **JWT Authentication** must be installed along with the plugin. This plugin extens the WP REST API using JSON Web Tokens Authentication as an authentication method. |
|
|
|
|
|
|
|
To support api token based authentication on WordPress, this plugins has [JWT Authentication for WP REST API plugin](https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/) as dependency. **JWT Authentication** must be installed along with the plugin. This plugin extens Extends the WP REST API using JSON Web Tokens Authentication as an authentication method. |
|
|