Version Description
- Fix conflicts with other plugins using the same JWT library adding a wrapper namespace to the JWT class.
Download this release
Release Info
Developer | Tmeister |
Plugin | JWT Authentication for WP REST API |
Version | 1.3.2 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.3.2
- includes/class-jwt-auth.php +7 -0
- includes/class-jwt-namespace-wrapper.php +18 -0
- jwt-auth.php +1 -1
- public/class-jwt-auth-public.php +2 -2
- readme.txt +5 -2
includes/class-jwt-auth.php
CHANGED
@@ -104,6 +104,13 @@ class Jwt_Auth {
|
|
104 |
*/
|
105 |
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jwt-auth-i18n.php';
|
106 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
/**
|
108 |
* The class responsible for defining all actions that occur in the public-facing
|
109 |
* side of the site.
|
104 |
*/
|
105 |
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-jwt-auth-i18n.php';
|
106 |
|
107 |
+
/**
|
108 |
+
* Class responsible for creating a `wrapper namespace` to load the Firebase's JWT & Key
|
109 |
+
* classes and prevent conflicts with other plugins using the same library
|
110 |
+
* with different versions.
|
111 |
+
*/
|
112 |
+
require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-jwt-namespace-wrapper.php';
|
113 |
+
|
114 |
/**
|
115 |
* The class responsible for defining all actions that occur in the public-facing
|
116 |
* side of the site.
|
includes/class-jwt-namespace-wrapper.php
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Define a `wrapper namespace` to load the Firebase's JWT & Key classes
|
4 |
+
* and prevent conflicts with other plugins using the same library
|
5 |
+
* with different versions.
|
6 |
+
*
|
7 |
+
* @link https://enriquechavez.co
|
8 |
+
* @since 1.3.2
|
9 |
+
* @author marioshtika https://github.com/marioshtika
|
10 |
+
*/
|
11 |
+
|
12 |
+
namespace Tmeister\Firebase\JWT;
|
13 |
+
|
14 |
+
class JWT extends \Firebase\JWT\JWT {
|
15 |
+
}
|
16 |
+
|
17 |
+
class Key extends \Firebase\JWT\Key {
|
18 |
+
}
|
jwt-auth.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: JWT Authentication for WP-API
|
16 |
* Plugin URI: https://enriquechavez.co
|
17 |
* Description: Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.
|
18 |
-
* Version: 1.3.
|
19 |
* Author: Enrique Chavez
|
20 |
* Author URI: https://enriquechavez.co
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: JWT Authentication for WP-API
|
16 |
* Plugin URI: https://enriquechavez.co
|
17 |
* Description: Extends the WP REST API using JSON Web Tokens Authentication as an authentication method.
|
18 |
+
* Version: 1.3.2
|
19 |
* Author: Enrique Chavez
|
20 |
* Author URI: https://enriquechavez.co
|
21 |
* License: GPL-2.0+
|
public/class-jwt-auth-public.php
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
<?php
|
2 |
|
3 |
/** Require the JWT library. */
|
4 |
-
use Firebase\JWT\JWT;
|
5 |
-
use Firebase\JWT\Key;
|
6 |
|
7 |
/**
|
8 |
* The public-facing functionality of the plugin.
|
1 |
<?php
|
2 |
|
3 |
/** Require the JWT library. */
|
4 |
+
use Tmeister\Firebase\JWT\JWT;
|
5 |
+
use Tmeister\Firebase\JWT\Key;
|
6 |
|
7 |
/**
|
8 |
* The public-facing functionality of the plugin.
|
readme.txt
CHANGED
@@ -4,9 +4,9 @@ Contributors: tmeister
|
|
4 |
Donate link: https://www.paypal.me/wpchavez
|
5 |
Tags: wp-json, jwt, json web authentication, wp-api
|
6 |
Requires at least: 4.2
|
7 |
-
Tested up to: 6.0.
|
8 |
Requires PHP: 7.4.0
|
9 |
-
Stable tag: 1.3.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -365,6 +365,9 @@ I've created a small app to test the basic functionality of the plugin; you can
|
|
365 |
###Please read how to configured the plugin https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/
|
366 |
|
367 |
== Changelog ==
|
|
|
|
|
|
|
368 |
= 1.3.1 =
|
369 |
* Updating the minimum version of PHP to 7.4
|
370 |
* Validate the signing algorithm against the supported algorithms @see https://www.rfc-editor.org/rfc/rfc7518#section-3
|
4 |
Donate link: https://www.paypal.me/wpchavez
|
5 |
Tags: wp-json, jwt, json web authentication, wp-api
|
6 |
Requires at least: 4.2
|
7 |
+
Tested up to: 6.0.3
|
8 |
Requires PHP: 7.4.0
|
9 |
+
Stable tag: 1.3.2
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
365 |
###Please read how to configured the plugin https://wordpress.org/plugins/jwt-authentication-for-wp-rest-api/
|
366 |
|
367 |
== Changelog ==
|
368 |
+
= 1.3.2 =
|
369 |
+
* Fix conflicts with other plugins using the same JWT library adding a wrapper namespace to the JWT class.
|
370 |
+
|
371 |
= 1.3.1 =
|
372 |
* Updating the minimum version of PHP to 7.4
|
373 |
* Validate the signing algorithm against the supported algorithms @see https://www.rfc-editor.org/rfc/rfc7518#section-3
|