Skip to content

Commit

Permalink
Merge pull request #1282 from chalasr/fix-empty-pubkey
Browse files Browse the repository at this point in the history
Fix compatibility with lcobucci/jwt ^4.2
  • Loading branch information
Sephster authored May 3, 2022
2 parents 0c2f32c + 88c4e28 commit 7aeb7c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/AuthorizationValidators/BearerTokenValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private function initJwtConfiguration()
{
$this->jwtConfiguration = Configuration::forSymmetricSigner(
new Sha256(),
InMemory::plainText('')
InMemory::plainText('empty', 'empty')
);

$this->jwtConfiguration->setValidationConstraints(
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/Traits/AccessTokenTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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')
);
}

Expand Down

0 comments on commit 7aeb7c4

Please sign in to comment.