Skip to content

Commit

Permalink
Merge pull request #1159 from Sephster/fix-key-passing
Browse files Browse the repository at this point in the history
Fix Key Passing where Priv Key has a Passphrase
  • Loading branch information
Sephster authored Nov 26, 2020
2 parents 8837ed9 + a88fcac commit 284c2b5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [8.2.1] - released 2020-11-26
### Fixed
- If you have a password on your private key, it is now passed correctly to the JWT configuration object. (PR #1159)

## [8.2.0] - released 2020-11-25
### Added
- Add a `getRedirectUri` function to the `OAuthServerException` class (PR #1123)
Expand Down Expand Up @@ -511,7 +515,8 @@ Version 5 is a complete code rewrite.

- First major release

[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...HEAD
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.1...HEAD
[8.2.1]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...8.2.1
[8.2.0]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...8.2.0
[8.1.1]: https://github.com/thephpleague/oauth2-server/compare/8.1.0...8.1.1
[8.1.0]: https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0
Expand Down
4 changes: 3 additions & 1 deletion src/Entities/Traits/AccessTokenTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ public function initJwtConfiguration()
{
$privateKeyPassPhrase = $this->privateKey->getPassPhrase();

$verificationKey = empty($privateKeyPassPhrase) ? InMemory::plainText('') : $privateKeyPassPhrase;
$verificationKey = empty($privateKeyPassPhrase) ?
InMemory::plainText('') :
InMemory::plainText($this->privateKey->getPassPhrase());

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

0 comments on commit 284c2b5

Please sign in to comment.