Skip to content

Commit

Permalink
Change to use plainText instead of empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Sephster committed Nov 24, 2020
1 parent 109795b commit 9a58173
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/AuthorizationValidators/BearerTokenValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@

namespace League\OAuth2\Server\AuthorizationValidators;

use DateTimeImmutable;
use DateTimeZone;
use Lcobucci\Clock\FrozenClock;
use Lcobucci\Clock\SystemClock;
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Encoding\CannotDecodeContent;
Expand Down Expand Up @@ -72,7 +70,7 @@ private function initJwtConfiguration()
{
$this->jwtConfiguration = Configuration::forSymmetricSigner(
new Sha256(),
InMemory::empty()
InMemory::plainText('')
);

$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 @@ -43,7 +43,7 @@ public function initJwtConfiguration()
{
$privateKeyPassPhrase = $this->privateKey->getPassPhrase();

$verificationKey = empty($privateKeyPassPhrase) ? InMemory::empty() : $privateKeyPassPhrase;
$verificationKey = empty($privateKeyPassPhrase) ? InMemory::plainText('') : $privateKeyPassPhrase;

$this->jwtConfiguration = Configuration::forAsymmetricSigner(
new Sha256(),
Expand Down

0 comments on commit 9a58173

Please sign in to comment.