
WPAPI CLIENT AUTHENICATION AND GLOBAL HANDLE
Author: | Oluwasegun Somefun (profile at wordpress.org) |
WordPress version required: | 4.8 |
WordPress version tested: | 4.8.2 |
Plugin version: | 2.0 |
Added to WordPress repository: | 22-08-2017 |
Last updated: | 20-09-2017
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 100 |
Rated by: | 1 |
Plugin URI: | |
Total downloads: | 2 923 |
Active installs: | 10+ |

Click to start download
|
Screenshots

STEP4_01: Basic WP-Authentication Settings: No Input

STEP4_02: Basic WP-Authentication Settings: Incorrect User or Incorrect Admin User Details

STEP4_03: Basic WP-Authentication Settings: Correct Dummy Admin User Details

STEP6_01: Console display when an admin is logged in and views the website

STEP6_02: Console display when other users are logged in and view the website

STEP6_03: Console display when a client views the website
FAQ
Installation Instructions
-
Download or Copy the plugin into your WordPress installation’s plugins directory on your Local development machine
-
Go to Plugins Dashboard. Activate the ‘EASY-JS-WPAPI Client HANDLE for the WordPress REST-API’
Now, Go to Users menu on the WordPress dashboard. Add new User. Create a dummy Administrator profile,
complete with username, password and full name. e.g: username: ‘matt’, password: ‘agba2700’
-
The Plugin is now activated, under it are the links: Settings | Deactivate | Edit
Now, Click on this Settings link OR on the WordPress Dashboard, Click on the “Basic WP-Authentication”
sub-menu of the Settings menu.
-
Enter the newly created dummy administrator username and its password. Click on the Save button
This username and password will be checked by the plugin to determine if it is a valid user,
and if it is a valid administrator user.
If the details you enter is correct, it displays the green unlock icon.
But if it is not, it displays the red lock icon, this tells you that you need to change
it to a valid admin username and password.
When the helper icon, displays a green unlock icon. You have finished setting up this plugin.
-
Go to your live production or development site. e.g: http://talker-test.org or http://localhost:8080
-
Check your browser console: If your administrator’s name is Matt, then you should see a console output:
“Hi! I am all set to talk with the WP REST-API.\n Best luck! on your WordPress Projects.”
N.B:
– Mozilla Browser Console: Tools > Web Developer > Web Console
– Chrome Browser Console: More Tools > Developer Tools > Console
- Open any .js script in your WordPress theme and start accessing the WP REST-API via the node-wpapi client
Example: // In a index.js controlling a index.php or index.html in a WordPress Theme
wp.posts().embed().get().then(function( response ) {
console.log( response );
//do something with returned data/response
});
What is the WP REST-API?
- Check : https://developer.wordpress.org/rest-api/
Why should I use node-wpapi.js client?
- It is simple to use and understand.
- Check : http://wp-api.org/node-wpapi/
ChangeLog
2.0
Second Release:
- Modified Authentication handlers for user cases to ensure seamless display of website data on a web-page.
1.0
First Release :
-
Installs the node-wpapi.js CLIENT.
-
Serves as a Cookie and Basic Authentication handler for the WP REST-API.
-
Access the WP REST-API in any javascript file using the WPAPI’s ‘wp’ global object directly.