From f7111e5da591c8c703f85d86cb1556aaebd92f3c Mon Sep 17 00:00:00 2001 From: Michael Sowah Date: Thu, 29 Dec 2022 18:07:19 +0000 Subject: [PATCH] Added a wrapper class around \Firebase\JWT\JWT and \Firebase\JWT\Key Added a wrapper class around \Firebase\JWT\JWT and \Firebase\JWT\Key to help avoid plugin conflicts such as https://github.com/usefulteam/jwt-auth/issues/82 --- class-auth.php | 10 ++++++++-- class-jwt-firebase-wrapper.php | 18 ++++++++++++++++++ jwt-auth.php | 1 + 3 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 class-jwt-firebase-wrapper.php diff --git a/class-auth.php b/class-auth.php index 924b74c..41a8cad 100644 --- a/class-auth.php +++ b/class-auth.php @@ -14,8 +14,14 @@ use WP_REST_Response; use WP_REST_Server; -use Firebase\JWT\JWT; -use Firebase\JWT\Key; +// use Firebase\JWT\JWT; +// use Firebase\JWT\Key; +/** + * Using the wrapper class to help avoid plugin conflicts such as. + * https://github.com/usefulteam/jwt-auth/issues/82 + */ +use JWTWrapAuth\Firebase\JWT\JWT; +use JWTWrapAuth\Firebase\JWT\Key; /** * The public-facing functionality of the plugin. diff --git a/class-jwt-firebase-wrapper.php b/class-jwt-firebase-wrapper.php new file mode 100644 index 0000000..71d239d --- /dev/null +++ b/class-jwt-firebase-wrapper.php @@ -0,0 +1,18 @@ +