File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33namespace Pdsinterop \Solid \Auth \Config ;
44
55use Defuse \Crypto \Key as CryptoKey ;
6+ use Lcobucci \JWT \Signer \Key ;
67use League \OAuth2 \Server \CryptKey ;
78
89class Keys
@@ -13,6 +14,8 @@ class Keys
1314 private $ encryptionKey ;
1415 /** @var CryptKey*/
1516 private $ privateKey ;
17+ /** @var Key */
18+ private $ publicKey ;
1619
1720 //////////////////////////// GETTERS AND SETTERS \\\\\\\\\\\\\\\\\\\\\\\\\\\
1821
@@ -28,6 +31,12 @@ final public function getPrivateKey() : CryptKey
2831 return $ this ->privateKey ;
2932 }
3033
34+ /*** @return Key */
35+ public function getPublicKey () : Key
36+ {
37+ return $ this ->publicKey ;
38+ }
39+
3140 //////////////////////////////// PUBLIC API \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
3241
3342 /**
@@ -36,10 +45,11 @@ final public function getPrivateKey() : CryptKey
3645 * @param CryptKey $privateKey
3746 * @param string|CryptoKey $encryptionKey
3847 */
39- final public function __construct (CryptKey $ privateKey , $ encryptionKey )
48+ final public function __construct (CryptKey $ privateKey , Key $ publicKey , $ encryptionKey )
4049 {
4150 // @FIXME: Add type-check for $encryptionKey (or an extending class with different parameter type?)
4251 $ this ->encryptionKey = $ encryptionKey ;
4352 $ this ->privateKey = $ privateKey ;
53+ $ this ->publicKey = $ publicKey ;
4454 }
4555}
You can’t perform that action at this time.
0 commit comments