Skip to content

Commit 61daefc

Browse files
rohanharikrclaude
andauthored
Rename c_hash to c_s256 per OIDC key binding spec update (#98)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d3b9afa commit 61daefc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/App.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
// Import the private JWK to a CryptoKey for signing using the stored algorithm
228228
const signingKey = await jose.importJWK(privateKey, algorithm || 'EdDSA');
229229
// Create a minimal DPoP proof JWT (RFC 9449)
230-
// Generate SHA256 hash of the code for c_hash
230+
// Generate SHA256 hash of the code for c_s256
231231
// Convert to BASE64URL as per spec section 1.8
232232
const codeHash = await crypto.subtle
233233
.digest('SHA-256', new TextEncoder().encode(code))
@@ -239,7 +239,7 @@
239239
);
240240
241241
const dpopPayload = {
242-
c_hash: codeHash,
242+
c_s256: codeHash,
243243
jti: crypto.randomUUID(),
244244
iat: Math.floor(Date.now() / 1000),
245245
htu: url.href,
@@ -360,7 +360,7 @@
360360
'Content-Type': 'application/x-www-form-urlencoded'
361361
};
362362
363-
// Generate DPoP proof for refresh (no c_hash needed)
363+
// Generate DPoP proof for refresh (no c_s256 needed)
364364
const isDpopEnabled =
365365
selectedScopes.includes('bound_key') && selectedProtocolParams.includes('dpop_jkt');
366366
if (isDpopEnabled) {

0 commit comments

Comments
 (0)