File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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))
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 ,
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) {
You can’t perform that action at this time.
0 commit comments