1616use League \OAuth2 \Server \Exception \OAuthServerException ;
1717use League \OAuth2 \Server \Grant \GrantTypeInterface ;
1818use League \OAuth2 \Server \Repositories \AccessTokenRepositoryInterface ;
19+ use League \OAuth2 \Server \Repositories \ClaimRepositoryInterface ;
1920use League \OAuth2 \Server \Repositories \ClientRepositoryInterface ;
2021use League \OAuth2 \Server \Repositories \ScopeRepositoryInterface ;
2122use League \OAuth2 \Server \RequestTypes \AuthorizationRequest ;
@@ -69,6 +70,11 @@ class AuthorizationServer implements EmitterAwareInterface
6970 */
7071 private $ scopeRepository ;
7172
73+ /**
74+ * @var ClaimRepositoryInterface
75+ */
76+ private $ claimRepository ;
77+
7278 /**
7379 * @var string|Key
7480 */
@@ -93,13 +99,15 @@ public function __construct(
9399 ClientRepositoryInterface $ clientRepository ,
94100 AccessTokenRepositoryInterface $ accessTokenRepository ,
95101 ScopeRepositoryInterface $ scopeRepository ,
102+ ClaimRepositoryInterface $ claimRepository ,
96103 $ privateKey ,
97104 $ encryptionKey ,
98105 ResponseTypeInterface $ responseType = null
99106 ) {
100107 $ this ->clientRepository = $ clientRepository ;
101108 $ this ->accessTokenRepository = $ accessTokenRepository ;
102109 $ this ->scopeRepository = $ scopeRepository ;
110+ $ this ->claimRepository = $ claimRepository ;
103111
104112 if ($ privateKey instanceof CryptKey === false ) {
105113 $ privateKey = new CryptKey ($ privateKey );
@@ -132,6 +140,7 @@ public function enableGrantType(GrantTypeInterface $grantType, DateInterval $acc
132140 $ grantType ->setAccessTokenRepository ($ this ->accessTokenRepository );
133141 $ grantType ->setClientRepository ($ this ->clientRepository );
134142 $ grantType ->setScopeRepository ($ this ->scopeRepository );
143+ $ grantType ->setClaimRepository ($ this ->claimRepository );
135144 $ grantType ->setDefaultScope ($ this ->defaultScope );
136145 $ grantType ->setPrivateKey ($ this ->privateKey );
137146 $ grantType ->setEmitter ($ this ->getEmitter ());
0 commit comments