Validate user_code expiry during the Device Code grant.

Add mock responses related to the Device Code grant.
This commit is contained in:
ErickSkrauch
2024-12-14 18:55:31 +01:00
parent 2cc27d34ad
commit 119a0f8078
8 changed files with 143 additions and 16 deletions

View File

@@ -314,8 +314,8 @@ final readonly class OauthProcess {
$parameter = $matches[1];
}
if ($parameter === null && str_starts_with($e->getErrorType(), 'invalid_')) {
$parameter = substr($e->getErrorType(), 8); // 8 is the length of the "invalid_"
if ($parameter === null && $hint === 'user_code') {
$parameter = $hint;
}
$response = [