|
33 | 33 | use SimpleSAML\Module\oidc\Factories\Entities\AccessTokenEntityFactory; |
34 | 34 | use SimpleSAML\Module\oidc\Factories\Entities\AuthCodeEntityFactory; |
35 | 35 | use SimpleSAML\Module\oidc\Helpers; |
| 36 | +use SimpleSAML\Module\oidc\ModuleConfig; |
36 | 37 | use SimpleSAML\Module\oidc\Repositories\AuthCodeRepository; |
37 | 38 | use SimpleSAML\Module\oidc\Repositories\Interfaces\AccessTokenRepositoryInterface; |
38 | 39 | use SimpleSAML\Module\oidc\Repositories\Interfaces\AuthCodeRepositoryInterface; |
@@ -142,6 +143,7 @@ public function __construct( |
142 | 143 | UserRepository $userRepository, |
143 | 144 | SubjectResolver $subjectResolver, |
144 | 145 | AccessTokenClaimsResolver $accessTokenClaimsResolver, |
| 146 | + protected readonly ModuleConfig $moduleConfig, |
145 | 147 | ) { |
146 | 148 | parent::__construct($authCodeRepository, $refreshTokenRepository, $authCodeTTL); |
147 | 149 |
|
@@ -292,6 +294,9 @@ public function completeOidcAuthorizationRequest( |
292 | 294 | [ |
293 | 295 | 'code' => $this->encrypt($jsonPayload), |
294 | 296 | 'state' => $authorizationRequest->getState(), |
| 297 | + // RFC 9207 section 2: the issuer identifier, so the client can tell which authorization server |
| 298 | + // answered. Error responses get it in AuthorizationController. |
| 299 | + 'iss' => $this->moduleConfig->getIssuer(), |
295 | 300 | ], |
296 | 301 | ); |
297 | 302 |
|
|
0 commit comments