Skip to content

Commit 7aeb7c4

Browse files
authored
Merge pull request #1282 from chalasr/fix-empty-pubkey
Fix compatibility with lcobucci/jwt ^4.2
2 parents 0c2f32c + 88c4e28 commit 7aeb7c4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- 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)
810

911
## [8.3.4] - released 2022-04-07
1012
### Fixed

src/AuthorizationValidators/BearerTokenValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private function initJwtConfiguration()
7070
{
7171
$this->jwtConfiguration = Configuration::forSymmetricSigner(
7272
new Sha256(),
73-
InMemory::plainText('')
73+
InMemory::plainText('empty', 'empty')
7474
);
7575

7676
$this->jwtConfiguration->setValidationConstraints(

src/Entities/Traits/AccessTokenTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function initJwtConfiguration()
4646
$this->jwtConfiguration = Configuration::forAsymmetricSigner(
4747
new Sha256(),
4848
InMemory::plainText($this->privateKey->getKeyContents(), $this->privateKey->getPassPhrase() ?? ''),
49-
InMemory::plainText('')
49+
InMemory::plainText('empty', 'empty')
5050
);
5151
}
5252

0 commit comments

Comments
 (0)