Skip to content

Commit 42fff3a

Browse files
committed
#41 - JWT fields cannot be retrieved via viewer query
- refactored a bit to keep things a bit cleaner
1 parent e1c903a commit 42fff3a

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

vendor/composer/ClassLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ public function isClassMapAuthoritative()
279279
*/
280280
public function setApcuPrefix($apcuPrefix)
281281
{
282-
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
282+
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
283283
}
284284

285285
/**
@@ -377,7 +377,7 @@ private function findFileWithExtension($class, $ext)
377377
$subPath = $class;
378378
while (false !== $lastPos = strrpos($subPath, '\\')) {
379379
$subPath = substr($subPath, 0, $lastPos);
380-
$search = $subPath.'\\';
380+
$search = $subPath . '\\';
381381
if (isset($this->prefixDirsPsr4[$search])) {
382382
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
383383
foreach ($this->prefixDirsPsr4[$search] as $dir) {

wp-graphql-jwt-authentication.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,9 @@
1717
* @package WPGraphQL_JWT_Authentication
1818
*/
1919

20-
namespace WPGraphQL\JWT_Auth;
20+
namespace WPGraphQL\JWT_Authentication;
2121

2222
// If this file is called directly, abort.
23-
use WPGraphQL\JWT_Authentication\Auth;
24-
use WPGraphQL\JWT_Authentication\ManageTokens;
25-
2623
if ( ! defined( 'WPINC' ) ) {
2724
die;
2825
}
@@ -36,7 +33,7 @@
3633
require_once( 'c3.php' );
3734
}
3835

39-
if ( ! class_exists( '\WPGraphQL\JWT_Auth' ) ) :
36+
if ( ! class_exists( '\WPGraphQL\JWT_Authentication' ) ) :
4037

4138
final class JWT_Authentication {
4239

@@ -204,4 +201,4 @@ function init() {
204201
return JWT_Authentication::instance();
205202
}
206203

207-
add_action( 'plugins_loaded', '\WPGraphQL\JWT_Auth\init', 1 );
204+
add_action( 'plugins_loaded', '\WPGraphQL\JWT_Authentication\init', 1 );

0 commit comments

Comments
 (0)