Skip to content

Commit 284c2b5

Browse files
authored
Merge pull request #1159 from Sephster/fix-key-passing
Fix Key Passing where Priv Key has a Passphrase
2 parents 8837ed9 + a88fcac commit 284c2b5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [8.2.1] - released 2020-11-26
10+
### Fixed
11+
- If you have a password on your private key, it is now passed correctly to the JWT configuration object. (PR #1159)
12+
913
## [8.2.0] - released 2020-11-25
1014
### Added
1115
- Add a `getRedirectUri` function to the `OAuthServerException` class (PR #1123)
@@ -511,7 +515,8 @@ Version 5 is a complete code rewrite.
511515

512516
- First major release
513517

514-
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...HEAD
518+
[Unreleased]: https://github.com/thephpleague/oauth2-server/compare/8.2.1...HEAD
519+
[8.2.1]: https://github.com/thephpleague/oauth2-server/compare/8.2.0...8.2.1
515520
[8.2.0]: https://github.com/thephpleague/oauth2-server/compare/8.1.1...8.2.0
516521
[8.1.1]: https://github.com/thephpleague/oauth2-server/compare/8.1.0...8.1.1
517522
[8.1.0]: https://github.com/thephpleague/oauth2-server/compare/8.0.0...8.1.0

src/Entities/Traits/AccessTokenTrait.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ public function initJwtConfiguration()
4646
{
4747
$privateKeyPassPhrase = $this->privateKey->getPassPhrase();
4848

49-
$verificationKey = empty($privateKeyPassPhrase) ? InMemory::plainText('') : $privateKeyPassPhrase;
49+
$verificationKey = empty($privateKeyPassPhrase) ?
50+
InMemory::plainText('') :
51+
InMemory::plainText($this->privateKey->getPassPhrase());
5052

5153
$this->jwtConfiguration = Configuration::forAsymmetricSigner(
5254
new Sha256(),

0 commit comments

Comments
 (0)