Creating a Custom OAuth App
If you do not have access to the user name and password or do not wish to require them, you can use OAuth authentication. WordPress uses the OAuth authentication standard, which requires the authenticating user to interact with WordPress via the browser. The driver facilitates the OAuth exchange in various ways, as described in this section. You will need the OAuth2 Plugin in order to authenticate via OAuth2.0. To install the plugin manually, copy the downloaded folder to the wp-content\plugins folder and then Activate the plugin through the 'Plugins' menu in the WordPress admin interface.
Create a Connected App
Register the driver as an OAuth application to obtain the following connection properties. To create the OAuth app, log into your site through the admin panel, navigate to OAuth Server and click on Add New Client. After filling in the required fields, you may click "Create Client" and the following Oauth credentials will be displayed:
- Client Key - This will be your OAuthClientId
- Client Secret - This will be your OAuthClientSecret
Set the CallbackURL to http://localhost:portnumber. Note that after having created the app, you will also need to make sure to approve your app under Users -> Applications-> YourAppName, in order to enable it to successfully connect to the data source.
You can now use these credentials to connect to WordPress by setting them as the following connection properties:
- OAuthClientId = Client Id
- OAuthClientSecret = Client Secret
- InitiateOAuth = GETANDREFRESH
- CallbackURL = Callback
- Url = The URL of your instance