22
33namespace Pdsinterop \Solid \Auth \Factory ;
44
5+ use Lcobucci \JWT \Signer \Key ;
56use League \OAuth2 \Server \CryptKey ;
67use Pdsinterop \Solid \Auth \Config ;
78use Pdsinterop \Solid \Auth \Enum \OAuth2 \GrantType ;
@@ -17,6 +18,8 @@ class ConfigFactory
1718 private $ encryptionKey ;
1819 /** @var string */
1920 private $ privateKey ;
21+ /** @var string */
22+ private $ publicKey ;
2023 /** @var array */
2124 private $ serverConfig ;
2225
@@ -25,13 +28,15 @@ final public function __construct(
2528 string $ clientSecret ,
2629 string $ encryptionKey ,
2730 string $ privateKey ,
31+ string $ publicKey ,
2832 array $ serverConfig
2933 ) {
3034 $ this ->clientIdentifier = $ clientIdentifier ;
3135 $ this ->clientSecret = $ clientSecret ;
3236 $ this ->encryptionKey = $ encryptionKey ;
3337 $ this ->privateKey = $ privateKey ;
3438 $ this ->serverConfig = $ serverConfig ;
39+ $ this ->publicKey = $ publicKey ;
3540 }
3641
3742 final public function create () : Config
@@ -40,6 +45,7 @@ final public function create() : Config
4045 $ clientSecret = $ this ->clientSecret ;
4146 $ encryptionKey = $ this ->encryptionKey ;
4247 $ privateKey = $ this ->privateKey ;
48+ $ publicKey = $ this ->publicKey ;
4349
4450 $ client = new Config \Client ($ clientIdentifier , $ clientSecret );
4551
@@ -53,6 +59,7 @@ final public function create() : Config
5359
5460 $ keys = new Config \Keys (
5561 new CryptKey ($ privateKey ),
62+ new Key ($ publicKey ),
5663 $ encryptionKey
5764 );
5865
0 commit comments