Skip to content

Commit 8624217

Browse files
committed
docs: standardize upgrade links and improve formatting
- Update support links to point to main upgrade page instead of /support/ - Add /upgrade path to admin action link for consistency - Standardize markdown formatting (bullets, tables, code blocks) - Improve README.md readability with consistent spacing
1 parent f68f3ae commit 8624217

File tree

3 files changed

+96
-80
lines changed

3 files changed

+96
-80
lines changed

README.md

Lines changed: 93 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,49 @@ This plugin seamlessly extends the WP REST API, enabling robust and secure authe
1010

1111
### Key features of this free version include:
1212

13-
* **Standard JWT Authentication:** Implements the industry-standard [RFC 7519](https://tools.ietf.org/html/rfc7519) for secure claims representation.
14-
* **Simple Endpoints:** Offers clear `/token` and `/token/validate` endpoints for generating and validating tokens.
15-
* **Configurable Secret Key:** Define your unique secret key via `wp-config.php` for secure token signing.
16-
* **Optional CORS Support:** Easily enable Cross-Origin Resource Sharing support via a `wp-config.php` constant.
17-
* **Developer Hooks:** Provides filters (`jwt_auth_expire`, `jwt_auth_token_before_sign`, etc.) for customizing token behavior.
13+
- **Standard JWT Authentication:** Implements the industry-standard [RFC 7519](https://tools.ietf.org/html/rfc7519) for secure claims representation.
14+
- **Simple Endpoints:** Offers clear `/token` and `/token/validate` endpoints for generating and validating tokens.
15+
- **Configurable Secret Key:** Define your unique secret key via `wp-config.php` for secure token signing.
16+
- **Optional CORS Support:** Easily enable Cross-Origin Resource Sharing support via a `wp-config.php` constant.
17+
- **Developer Hooks:** Provides filters (`jwt_auth_expire`, `jwt_auth_token_before_sign`, etc.) for customizing token behavior.
1818

1919
For users requiring more advanced capabilities such as multiple signing algorithms (RS256, ES256), token refresh/revocation, UI-based configuration, or priority support, consider checking out **[JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_link)**.
2020

21-
**Support and Requests:** Please use [GitHub Issues](https://github.com/Tmeister/wp-api-jwt-auth/issues). For priority support, consider upgrading to [PRO](https://jwtauth.pro/support/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_support_link).
21+
**Support and Requests:** Please use [GitHub Issues](https://github.com/Tmeister/wp-api-jwt-auth/issues). For priority support, consider upgrading to [PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_support_link).
2222

2323
## JWT Authentication PRO
2424

2525
Elevate your WordPress security and integration capabilities with **JWT Authentication PRO**. Building upon the solid foundation of the free version, the PRO version offers advanced features, enhanced security options, and a streamlined user experience:
2626

27-
* **Easy Configuration UI:** Manage all settings directly from the WordPress admin area.
28-
* **Token Refresh Endpoint:** Allow users to refresh expired tokens seamlessly without requiring re-login.
29-
* **Token Revocation Endpoint:** Immediately invalidate specific tokens for enhanced security control.
30-
* **Customizable Token Payload:** Add custom claims to your JWT payload to suit your specific application needs.
31-
* **Granular CORS Control:** Define allowed origins and headers with more precision directly in the settings.
32-
* **Rate Limiting:** Protect your endpoints from abuse with configurable rate limits.
33-
* **Audit Logs:** Keep track of token generation, validation, and errors.
34-
* **Priority Support:** Get faster, dedicated support directly from the developer.
27+
- **Easy Configuration UI:** Manage all settings directly from the WordPress admin area.
28+
- **Token Refresh Endpoint:** Allow users to refresh expired tokens seamlessly without requiring re-login.
29+
- **Token Revocation Endpoint:** Immediately invalidate specific tokens for enhanced security control.
30+
- **Customizable Token Payload:** Add custom claims to your JWT payload to suit your specific application needs.
31+
- **Granular CORS Control:** Define allowed origins and headers with more precision directly in the settings.
32+
- **Rate Limiting:** Protect your endpoints from abuse with configurable rate limits.
33+
- **Audit Logs:** Keep track of token generation, validation, and errors.
34+
- **Priority Support:** Get faster, dedicated support directly from the developer.
3535

3636
**[Upgrade to JWT Authentication PRO Today!](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=pro_section_cta)**
3737

3838
### Free vs. PRO Comparison
3939

4040
Here's a quick look at the key differences:
4141

42-
| Feature | Free Version | JWT Auth Pro (starts at $59/yr) |
43-
|---------|-------------|--------------------------|
44-
| Basic JWT Authentication | ✅ Included | ✅ Included |
45-
| Token Generation | ✅ Included | ✅ Included |
46-
| Token Validation | ✅ Included | ✅ Included |
47-
| Token Refresh Mechanism | ❌ Not Included | ✅ Included |
48-
| Token Revocation | ❌ Not Included | ✅ Included |
49-
| Token Management Dashboard | ❌ Not Included | ✅ Included |
50-
| Analytics & Monitoring | ❌ Not Included | ✅ Included |
51-
| Geo-IP Identification | ❌ Not Included | ✅ Included |
52-
| Rate Limiting | ❌ Not Included | ✅ Included |
53-
| Detailed Documentation | Basic | Comprehensive |
54-
| Developer Tools | ❌ Not Included | ✅ Included |
55-
| Premium Support | Community via GitHub | Priority Direct Support |
42+
| Feature | Free Version | JWT Auth Pro (starts at $59/yr) |
43+
| -------------------------- | -------------------- | ------------------------------- |
44+
| Basic JWT Authentication | ✅ Included | ✅ Included |
45+
| Token Generation | ✅ Included | ✅ Included |
46+
| Token Validation | ✅ Included | ✅ Included |
47+
| Token Refresh Mechanism | ❌ Not Included | ✅ Included |
48+
| Token Revocation | ❌ Not Included | ✅ Included |
49+
| Token Management Dashboard | ❌ Not Included | ✅ Included |
50+
| Analytics & Monitoring | ❌ Not Included | ✅ Included |
51+
| Geo-IP Identification | ❌ Not Included | ✅ Included |
52+
| Rate Limiting | ❌ Not Included | ✅ Included |
53+
| Detailed Documentation | Basic | Comprehensive |
54+
| Developer Tools | ❌ Not Included | ✅ Included |
55+
| Premium Support | Community via GitHub | Priority Direct Support |
5656

5757
## Requirements
5858

@@ -132,63 +132,65 @@ When the plugin is activated, a new namespace is added:
132132

133133
Also, two new endpoints are added to this namespace:
134134

135-
| Endpoint | HTTP Verb |
136-
|----------|-----------|
137-
| */wp-json/jwt-auth/v1/token* | POST |
138-
| */wp-json/jwt-auth/v1/token/validate* | POST |
135+
| Endpoint | HTTP Verb |
136+
| ------------------------------------- | --------- |
137+
| _/wp-json/jwt-auth/v1/token_ | POST |
138+
| _/wp-json/jwt-auth/v1/token/validate_ | POST |
139139

140140
**Need more functionality?** [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=endpoints_pro_note) includes additional endpoints for token refresh and revocation.
141141

142142
## Usage
143+
143144
### /wp-json/jwt-auth/v1/token
144145

145146
This is the entry point for JWT Authentication.
146147

147-
It validates the user credentials, *username* and *password*, and returns a token to use in future requests to the API if the authentication is correct, or an error if authentication fails.
148+
It validates the user credentials, _username_ and _password_, and returns a token to use in future requests to the API if the authentication is correct, or an error if authentication fails.
148149

149150
#### Sample Request Using AngularJS
150151

151152
```javascript
152-
(function() {
153-
var app = angular.module('jwtAuth', []);
154-
155-
app.controller('MainController', function($scope, $http) {
156-
var apiHost = 'http://yourdomain.com/wp-json';
157-
158-
$http.post(apiHost + '/jwt-auth/v1/token', {
159-
username: 'admin',
160-
password: 'password'
161-
})
162-
.then(function(response) {
163-
console.log(response.data)
164-
})
165-
.catch(function(error) {
166-
console.error('Error', error.data[0]);
167-
});
168-
});
169-
})();
153+
;(function () {
154+
var app = angular.module('jwtAuth', [])
155+
156+
app.controller('MainController', function ($scope, $http) {
157+
var apiHost = 'http://yourdomain.com/wp-json'
158+
159+
$http
160+
.post(apiHost + '/jwt-auth/v1/token', {
161+
username: 'admin',
162+
password: 'password',
163+
})
164+
.then(function (response) {
165+
console.log(response.data)
166+
})
167+
.catch(function (error) {
168+
console.error('Error', error.data[0])
169+
})
170+
})
171+
})()
170172
```
171173

172174
Success response from the server:
173175

174176
```json
175177
{
176-
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9qd3QuZGV2IiwiaWF0IjoxNDM4NTcxMDUwLCJuYmYiOjE0Mzg1NzEwNTAsImV4cCI6MTQzOTE3NTg1MCwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMSJ9fX0.YNe6AyWW4B7ZwfFE5wJ0O6qQ8QFcYizimDmBy6hCH_8",
177-
"user_display_name": "admin",
178-
"user_email": "admin@localhost.dev",
179-
"user_nicename": "admin"
178+
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9qd3QuZGV2IiwiaWF0IjoxNDM4NTcxMDUwLCJuYmYiOjE0Mzg1NzEwNTAsImV4cCI6MTQzOTE3NTg1MCwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMSJ9fX0.YNe6AyWW4B7ZwfFE5wJ0O6qQ8QFcYizimDmBy6hCH_8",
179+
"user_display_name": "admin",
180+
"user_email": "admin@localhost.dev",
181+
"user_nicename": "admin"
180182
}
181183
```
182184

183185
Error response from the server:
184186

185187
```json
186188
{
187-
"code": "jwt_auth_failed",
188-
"data": {
189-
"status": 403
190-
},
191-
"message": "Invalid Credentials."
189+
"code": "jwt_auth_failed",
190+
"data": {
191+
"status": 403
192+
},
193+
"message": "Invalid Credentials."
192194
}
193195
```
194196

@@ -199,23 +201,28 @@ From this point, you should pass this token with every API call.
199201
#### Sample Call Using The Authorization Header With AngularJS
200202

201203
```javascript
202-
app.config(function($httpProvider) {
203-
$httpProvider.interceptors.push(['$q', '$location', '$cookies', function($q, $location, $cookies) {
204-
return {
205-
'request': function(config) {
206-
config.headers = config.headers || {};
207-
// Assume that you store the token in a cookie
208-
var globals = $cookies.getObject('globals') || {};
209-
// If the cookie has the CurrentUser and the token
210-
// add the Authorization header in each request
211-
if (globals.currentUser && globals.currentUser.token) {
212-
config.headers.Authorization = 'Bearer ' + globals.currentUser.token;
213-
}
214-
return config;
204+
app.config(function ($httpProvider) {
205+
$httpProvider.interceptors.push([
206+
'$q',
207+
'$location',
208+
'$cookies',
209+
function ($q, $location, $cookies) {
210+
return {
211+
request: function (config) {
212+
config.headers = config.headers || {}
213+
// Assume that you store the token in a cookie
214+
var globals = $cookies.getObject('globals') || {}
215+
// If the cookie has the CurrentUser and the token
216+
// add the Authorization header in each request
217+
if (globals.currentUser && globals.currentUser.token) {
218+
config.headers.Authorization = 'Bearer ' + globals.currentUser.token
219+
}
220+
return config
221+
},
215222
}
216-
};
217-
}]);
218-
});
223+
},
224+
])
225+
})
219226
```
220227

221228
The **wp-api-jwt-auth** plugin will intercept every call to the server and will look for the Authorization Header. If the Authorization header is present, it will try to decode the token and will set the user according to the data stored in it.
@@ -393,30 +400,39 @@ $token = JWT::decode(
393400
## Frequently Asked Questions
394401

395402
### Does this plugin support algorithms other than HS256?
403+
396404
The free version only supports HS256. For support for RS256, ES256, and other algorithms, please consider [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_algorithms_link).
397405

398406
### Can I manage settings without editing wp-config.php?
407+
399408
The free version requires editing `wp-config.php`. [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_config_link) provides a full settings UI within the WordPress admin.
400409

401410
### Is there a way to refresh or revoke tokens?
411+
402412
Token refresh and revocation features are available in [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_refresh_revoke_link).
403413

404414
### Where can I get faster support?
405-
Priority support is included with [JWT Authentication PRO](https://jwtauth.pro/support/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_support_link). For free support, please use the [GitHub issues tracker](https://github.com/Tmeister/wp-api-jwt-auth/issues).
415+
416+
Priority support is included with [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_support_link). For free support, please use the [GitHub issues tracker](https://github.com/Tmeister/wp-api-jwt-auth/issues).
406417

407418
### How secure is JWT authentication?
419+
408420
JWT authentication is very secure when implemented correctly. Make sure to use a strong secret key and keep it confidential. [JWT Auth PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_security_link) offers additional security features like rate limiting and token revocation.
409421

410422
## Testing
423+
411424
I've created a small app to test the basic functionality of the plugin. You can get the app and read all the details in the [JWT-Client Repo](https://github.com/Tmeister/jwt-client).
412425

413426
## Credits
427+
414428
[WP REST API V2](http://v2.wp-api.org/)
415429

416430
[PHP-JWT from firebase](https://github.com/firebase/php-jwt)
417431

418432
## License
433+
419434
[GPLv2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
420435

421436
---
437+
422438
Want to enhance your JWT authentication with advanced features like token refresh, revocation, UI-based configuration, multiple algorithms, and more? Check out [JWT Authentication PRO](https://jwtauth.pro/?utm_source=github_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=footer_cta)!

admin/class-jwt-auth-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ public function add_action_link(array $links, string $file): array
818818
'utm_content' => 'token-dashboard-primary',
819819
];
820820

821-
$base_pro_url = 'https://jwtauth.pro';
821+
$base_pro_url = 'https://jwtauth.pro/upgrade';
822822
$utm_params = [
823823
'utm_source' => 'plugin-list',
824824
'utm_medium' => 'action-link',

readme.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ JSON Web Tokens are an open, industry standard method for representing claims se
2828

2929
For users requiring more advanced capabilities such as multiple signing algorithms (RS256, ES256), token refresh/revocation, UI-based configuration, or priority support, consider checking out **[JWT Authentication PRO](https://jwtauth.pro/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_link_soft)**.
3030

31-
**Support and Requests:** Please use [GitHub Issues](https://github.com/Tmeister/wp-api-jwt-auth/issues). For priority support, consider upgrading to [PRO](https://jwtauth.pro/support/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_support_link).
31+
**Support and Requests:** Please use [GitHub Issues](https://github.com/Tmeister/wp-api-jwt-auth/issues). For priority support, consider upgrading to [PRO](https://jwtauth.pro/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=description_support_link).
3232

3333
### REQUIREMENTS
3434

@@ -418,7 +418,7 @@ The free version requires editing `wp-config.php`. [JWT Authentication PRO](http
418418
Token refresh and revocation features are available in [JWT Authentication PRO](https://jwtauth.pro/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_refresh_revoke_link).
419419

420420
= Where can I get faster support? =
421-
Priority support is included with [JWT Authentication PRO](https://jwtauth.pro/support/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_support_link). For free support, please use the [GitHub issues tracker](https://github.com/Tmeister/wp-api-jwt-auth/issues).
421+
Priority support is included with [JWT Authentication PRO](https://jwtauth.pro/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_support_link). For free support, please use the [GitHub issues tracker](https://github.com/Tmeister/wp-api-jwt-auth/issues).
422422

423423
= How secure is JWT authentication? =
424424
JWT authentication is very secure when implemented correctly. Make sure to use a strong secret key and keep it confidential. [JWT Auth PRO](https://jwtauth.pro/?utm_source=wp_plugin_readme&utm_medium=link&utm_campaign=pro_promotion&utm_content=faq_security_link) offers additional security features like rate limiting and token revocation.

0 commit comments

Comments
 (0)