| @@ -1,18 +1,13 @@ | ||
| 1 | 1 | === JSON API Auth === |
| 2 | 2 | |
| 3 | 3 | Donate link: http://www.parorrey.com |
| 4 | - | |
| 5 | 4 | Tags: json api, api, authenticate user, wordpress user authentication |
| 6 | - | |
| 7 | 5 | Contributors: parorrey |
| 8 | - | |
| 9 | -Stable tag: 1.5 | |
| 10 | - | |
| 6 | +Stable tag: 1.9.4 | |
| 11 | 7 | Requires at least: 3.0.1 |
| 12 | - | |
| 13 | -Tested up to: 4.1 | |
| 14 | - | |
| 8 | +Tested up to: 4.9.8 | |
| 9 | +Requires PHP: 5.3 | |
| 15 | 10 | License: GPLv2 or later |
| 16 | 11 | |
| 17 | 12 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 18 | 13 | |
| @@ -17,14 +12,13 @@ | ||
| 17 | 12 | License URI: http://www.gnu.org/licenses/gpl-2.0.html |
| 18 | 13 | |
| 19 | 14 | Extends the JSON API Plugin for RESTful user authentication |
| 20 | 15 | |
| 21 | -==Description== | |
| 16 | +== Description == | |
| 22 | 17 | |
| 23 | 18 | JSON API Auth extends the JSON API Plugin to allow RESTful user authentication. |
| 24 | 19 | |
| 25 | 20 | |
| 26 | - | |
| 27 | 21 | Features include: |
| 28 | 22 | |
| 29 | 23 | * Generate Auth Cookie for user authentication |
| 30 | 24 | |
| @@ -29,19 +23,16 @@ | ||
| 29 | 23 | * Generate Auth Cookie for user authentication |
| 30 | 24 | |
| 31 | 25 | * Validate Auth Cookie |
| 32 | 26 | |
| 33 | -* Clear Auth Cookie | |
| 34 | - | |
| 35 | 27 | * Get Current User Info |
| 36 | 28 | |
| 29 | +For documentation: See 'Other Notes' tab above for usage examples. | |
| 37 | 30 | |
| 38 | -For details: http://www.parorrey.com/solutions/json-api-auth/ | |
| 31 | +Credits: http://www.parorrey.com/solutions/json-api-auth/ | |
| 39 | 32 | |
| 33 | +== Installation == | |
| 40 | 34 | |
| 41 | - | |
| 42 | -==Installation== | |
| 43 | - | |
| 44 | 35 | First you have to install the JSON API for WordPress Plugin (http://wordpress.org/extend/plugins/json-api/installation/). |
| 45 | 36 | |
| 46 | 37 | To install JSON API Auth just follow these steps: |
| 47 | 38 | |
| @@ -50,16 +41,56 @@ | ||
| 50 | 41 | * activate the plugin through the 'Plugins' menu in WordPress or by using the link provided by the plugin installer |
| 51 | 42 | |
| 52 | 43 | * activate the controller through the JSON API menu found in the WordPress admin center (Settings -> JSON API) |
| 53 | 44 | |
| 45 | +== Screenshots == | |
| 54 | 46 | |
| 55 | -== Screenshots == | |
| 47 | +1. Call to generate_auth_cookie endpoint using Postman | |
| 48 | +2. Call to get_currentuserinfo endpoint using Postman | |
| 49 | +3. Call to validate_auth_cookie endpoint using Postman | |
| 56 | 50 | |
| 51 | +== Changelog == | |
| 57 | 52 | |
| 53 | += 1.9.4 = | |
| 58 | 54 | |
| 55 | +* Updated logo and header. | |
| 59 | 56 | |
| 60 | -==Changelog== | |
| 57 | += 1.9.3 = | |
| 61 | 58 | |
| 59 | +* Added minimum php version requirement. | |
| 60 | + | |
| 61 | += 1.9.2 = | |
| 62 | + | |
| 63 | +* Added icons, screenshots, & fixed plugin header. | |
| 64 | + | |
| 65 | += 1.9.1 = | |
| 66 | + | |
| 67 | +* Updated for WordPress 4.9.8 version. | |
| 68 | + | |
| 69 | += 1.9 = | |
| 70 | + | |
| 71 | +* Updated for WordPress 4.9 version. | |
| 72 | + | |
| 73 | + | |
| 74 | += 1.8 = | |
| 75 | + | |
| 76 | +* Updated for WordPress 4.4 version. Made it secure by adding SSL check and adding POST method support, thanks to 'xiffy' for sharing code. | |
| 77 | + | |
| 78 | += 1.7 = | |
| 79 | + | |
| 80 | +* updated for wordpress 4.1.2 version | |
| 81 | + | |
| 82 | += 1.6 = | |
| 83 | + | |
| 84 | +* generate_auth_cookie does not require nonce any more to generate cookie. | |
| 85 | +* generate_auth_cookie now also returns 'cookie_name'. | |
| 86 | + | |
| 87 | += 1.5.1 = | |
| 88 | + | |
| 89 | +* Fixed the JSON API Plugin link with protocol | |
| 90 | +* Updated notes for documentation. | |
| 91 | + | |
| 92 | + | |
| 62 | 93 | = 1.5 = |
| 63 | 94 | |
| 64 | 95 | * Added the function to authenticate, allow the user (with edit rights) to use JSON API core controllers as well. Thanks `necro_txilok` for the suggestion. |
| 65 | 96 | * Removed `clear_auth_cookie` for not doing what it intends to do, instead `generate_auth_cookie` has been modified to allow setting up auth cookie for any required duration. Just provide the `seconds` var with `nonce`, `username` and `password` to get required cookie. Default time is 14 days. |
| @@ -104,13 +135,12 @@ | ||
| 104 | 135 | |
| 105 | 136 | * Initial release. |
| 106 | 137 | |
| 107 | 138 | |
| 108 | -==Documentation== | |
| 139 | + == Frequently Asked Questions == | |
| 109 | 140 | |
| 110 | 141 | Thanks to 'mattberg' who wrote the auth controller (https://github.com/mattberg/wp-json-api-auth) initially. I have added few methods and authored it as a WordPress plugin so that it could easily be searched and installed vis WordPress. |
| 111 | 142 | |
| 112 | - | |
| 113 | 143 | * There are following methods available: validate_auth_cookie, generate_auth_cookie, clear_auth_cookie, get_currentuserinfo |
| 114 | 144 | |
| 115 | 145 | * nonce can be created by calling http://localhost/api/get_nonce/?controller=auth&method=generate_auth_cookie |
| 116 | 146 | |
| @@ -133,17 +163,15 @@ | ||
| 133 | 163 | |
| 134 | 164 | |
| 135 | 165 | = Method: generate_auth_cookie = |
| 136 | 166 | |
| 137 | -It needs `nonce`, `username`, `password` vars. `seconds` is optional. | |
| 167 | +It needs `username`, `password` vars. `seconds` is optional. | |
| 138 | 168 | |
| 139 | -First get the nonce: http://localhost/api/get_nonce/?controller=auth&method=generate_auth_cookie | |
| 169 | +Then generate cookie: http://localhost/api/auth/generate_auth_cookie/?username=john&password=PASSWORD-HERE | |
| 140 | 170 | |
| 141 | -Then generate cookie: http://localhost/api/auth/generate_auth_cookie/?nonce=375034fjwfn39u8&username=john&password=PASSWORD-HERE | |
| 142 | - | |
| 143 | 171 | Optional 'seconds' var. It provided, generated cookie will be valid for that many seconds, otherwise default is for 14 days. |
| 144 | 172 | |
| 145 | -generate cookie for 1 minute: http://localhost/api/auth/generate_auth_cookie/?nonce=375034fjwfn39u8&username=john&password=PASSWORD-HERE&seconds=60 | |
| 173 | +generate cookie for 1 minute: http://localhost/api/auth/generate_auth_cookie/?username=john&password=PASSWORD-HERE&seconds=60 | |
| 146 | 174 | |
| 147 | 175 | 60 means 1 minute. |
| 148 | 176 | |
| 149 | 177 | |