diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c330d08c..b83689127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Use InMemory::plainText('empty', 'empty') instead of InMemory::plainText('') to avoid [new empty string exception](https://github.com/lcobucci/jwt/pull/833) thrown by lcobucci/jwt (PR #1282) ## [8.3.4] - released 2022-04-07 ### Fixed diff --git a/src/AuthorizationValidators/BearerTokenValidator.php b/src/AuthorizationValidators/BearerTokenValidator.php index e41e1a2b7..3c16f6850 100644 --- a/src/AuthorizationValidators/BearerTokenValidator.php +++ b/src/AuthorizationValidators/BearerTokenValidator.php @@ -70,7 +70,7 @@ private function initJwtConfiguration() { $this->jwtConfiguration = Configuration::forSymmetricSigner( new Sha256(), - InMemory::plainText('') + InMemory::plainText('empty', 'empty') ); $this->jwtConfiguration->setValidationConstraints( diff --git a/src/Entities/Traits/AccessTokenTrait.php b/src/Entities/Traits/AccessTokenTrait.php index 5caf9533d..81b634397 100644 --- a/src/Entities/Traits/AccessTokenTrait.php +++ b/src/Entities/Traits/AccessTokenTrait.php @@ -46,7 +46,7 @@ public function initJwtConfiguration() $this->jwtConfiguration = Configuration::forAsymmetricSigner( new Sha256(), InMemory::plainText($this->privateKey->getKeyContents(), $this->privateKey->getPassPhrase() ?? ''), - InMemory::plainText('') + InMemory::plainText('empty', 'empty') ); }