Compare commits

..
Author SHA1 Message Date
bence 829769bd75 make nonce null by default
rvr-nextgen/pipeline/head This commit looks good
2026-04-13 23:45:19 +02:00
bence 8a3fe76499 fix nonce
rvr-nextgen/pipeline/head This commit looks good
rvr-nextgen/pipeline/tag This commit looks good
2025-12-26 23:13:48 +01:00
bence d82e17422c make nonce optional
rvr-nextgen/pipeline/head This commit looks good
rvr-nextgen/pipeline/tag This commit looks good
2025-08-20 01:17:37 +02:00
4 changed files with 9 additions and 5 deletions

No files matched your search

@@ -0,0 +1,2 @@
ALTER TABLE `oauth_sessions`
MODIFY `nonce` varchar(255) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL;
+3 -1
View File
@@ -109,8 +109,10 @@ class OAuthController
'nbf' => $session->getCreatedDate()->getTimestamp(),
'exp' => $token->getExpiresDate()->getTimestamp(),
'aud' => $session->getClientId(),
'nonce' => $session->getNonce()
];
if ($session->getNonce() !== null) {
$commonPayload['nonce'] = $session->getNonce();
}
$idTokenPayload = array_merge($commonPayload, $this->getUserInfoInternal(
$this->userRepository->getById($session->getUserId()),
$session->getScopeArray())
+1 -1
View File
@@ -29,7 +29,7 @@ class OAuthSessionController implements IAuthenticationRequired
$clientId = \Container::$request->query('client_id');
$scope = \Container::$request->query('scope') ? \Container::$request->query('scope'): '';
$state = \Container::$request->query('state');
$nonce = \Container::$request->query('nonce') ? \Container::$request->query('nonce'): '';
$nonce = \Container::$request->query('nonce') ? \Container::$request->query('nonce'): null;
$codeChallenge = \Container::$request->query('code_challenge') ?: null;
$codeChallengeMethod = \Container::$request->query('code_challenge_method') ?: null;
+3 -3
View File
@@ -19,7 +19,7 @@ class OAuthSession extends Model
private array $scope = [];
private string $nonce = '';
private ?string $nonce = null;
private ?string $codeChallenge = null;
@@ -52,7 +52,7 @@ class OAuthSession extends Model
$this->setScopeArray(explode(' ', $scope));
}
public function setNonce(string $nonce): void
public function setNonce(?string $nonce): void
{
$this->nonce = $nonce;
}
@@ -125,7 +125,7 @@ class OAuthSession extends Model
return $this->scope;
}
public function getNonce(): string
public function getNonce(): ?string
{
return $this->nonce;
}