diff --git a/app/Extensions/Lcobucci/JWT/Encoding/TimestampDates.php b/app/Extensions/Lcobucci/JWT/Encoding/TimestampDates.php new file mode 100644 index 00000000..69c18dd5 --- /dev/null +++ b/app/Extensions/Lcobucci/JWT/Encoding/TimestampDates.php @@ -0,0 +1,33 @@ +getTimestamp(); + } + + return $claims; + } +} diff --git a/app/Services/Nodes/NodeJWTService.php b/app/Services/Nodes/NodeJWTService.php index 2d36904e..035b6172 100644 --- a/app/Services/Nodes/NodeJWTService.php +++ b/app/Services/Nodes/NodeJWTService.php @@ -9,6 +9,7 @@ use Pterodactyl\Models\Node; use Lcobucci\JWT\Configuration; use Lcobucci\JWT\Signer\Hmac\Sha256; use Lcobucci\JWT\Signer\Key\InMemory; +use Pterodactyl\Extensions\Lcobucci\JWT\Encoding\TimestampDates; class NodeJWTService { @@ -75,7 +76,7 @@ class NodeJWTService $identifier = hash($algo, $identifiedBy); $config = Configuration::forSymmetricSigner(new Sha256, InMemory::plainText($node->getDecryptedKey())); - $builder = $config->builder() + $builder = $config->builder(new TimestampDates) ->issuedBy(config('app.url')) ->permittedFor($node->getConnectionAddress()) ->identifiedBy($identifier)