File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,21 @@ class AuthorizationServerFactory
1414 /** @var Config */
1515 private $ config ;
1616
17+ /** @var RepositoryFactory */
18+ private $ repositoryFactory ;
19+
1720 //////////////////////////////// PUBLIC API \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
1821
1922 final public function __construct (Config $ config )
2023 {
2124 $ this ->config = $ config ;
2225 }
2326
27+ final public function setRepositoryFactory (RepositoryFactory $ repositoryFactory )
28+ {
29+ $ this ->repositoryFactory = $ repositoryFactory ;
30+ }
31+
2432 final public function create () : AuthorizationServer
2533 {
2634 $ config = $ this ->config ;
@@ -30,7 +38,7 @@ final public function create() : AuthorizationServer
3038 $ grantTypes = $ config ->getGrantTypes ();
3139 $ keys = $ config ->getKeys ();
3240
33- $ repositoryFactory = new RepositoryFactory ([
41+ $ repositoryFactory = $ this -> repositoryFactory ?? new RepositoryFactory ([
3442 Repository::CLIENT => new Client (
3543 $ client ->getIdentifier (),
3644 $ client ->getSecret (),
You can’t perform that action at this time.
0 commit comments