Skip to content

Commit

Permalink
Merge pull request #151 from oat-sa/fix/AUT-2631/allow-empty-verifica…
Browse files Browse the repository at this point in the history
…tion-key

fix: allow empty validation keys to be set into security configuration
  • Loading branch information
wazelin authored Sep 13, 2022
2 parents 237fafd + 99646a8 commit cf7c8d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
CHANGELOG
=========

Unreleased
6.7.2
-----

* Added AUD claim validation in `LtiServiceClient`
* Fixed AUD claim validation in `LtiServiceClient`
* Fixed empty validation key assignment to the security configuration

6.7.1
-----
Expand Down
4 changes: 3 additions & 1 deletion src/Security/Jwt/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ private function findAlgorithm(?KeyInterface $signingKey = null, ?KeyInterface $
private function convertKey(?KeyInterface $key = null): Key
{
if (null === $key) {
return InMemory::plainText('');
return method_exists(InMemory::class, 'empty')
? InMemory::empty()
: InMemory::plainText('');
}

return $this->converter->convert($key);
Expand Down

0 comments on commit cf7c8d3

Please sign in to comment.