|
@@ 176-184 (lines=9) @@
|
| 173 |
|
public function createCodeResponse(TokenInterface $code, string $state = null): ResponseInterface |
| 174 |
|
{ |
| 175 |
|
$client = $this->getIntegration()->getClientRepository()->read($code->getClientIdentifier()); |
| 176 |
|
if ($code->getRedirectUriString() === null || |
| 177 |
|
in_array($code->getRedirectUriString(), $client->getRedirectUriStrings()) === false |
| 178 |
|
) { |
| 179 |
|
$this->logDebug( |
| 180 |
|
'Code has invalid redirect URI which do not match any redirect URI for its client.', |
| 181 |
|
['id' => $code->getIdentifier()] |
| 182 |
|
); |
| 183 |
|
return $this->getIntegration()->createInvalidClientAndRedirectUriErrorResponse(); |
| 184 |
|
} |
| 185 |
|
|
| 186 |
|
$code->setCode($this->getIntegration()->generateCodeValue($code)); |
| 187 |
|
|
|
@@ 202-210 (lines=9) @@
|
| 199 |
|
public function createTokenResponse(TokenInterface $token, string $state = null): ResponseInterface |
| 200 |
|
{ |
| 201 |
|
$client = $this->getIntegration()->getClientRepository()->read($token->getClientIdentifier()); |
| 202 |
|
if ($token->getRedirectUriString() === null || |
| 203 |
|
in_array($token->getRedirectUriString(), $client->getRedirectUriStrings()) === false |
| 204 |
|
) { |
| 205 |
|
$this->logDebug( |
| 206 |
|
'Token has invalid redirect URI which do not match any redirect URI for its client.', |
| 207 |
|
['id' => $token->getIdentifier()] |
| 208 |
|
); |
| 209 |
|
return $this->getIntegration()->createInvalidClientAndRedirectUriErrorResponse(); |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
list($tokenValue, $tokenType, $tokenExpiresIn) = $this->getIntegration()->generateTokenValues($token); |
| 213 |
|
|