fix bug that created invalid JSON for JWK thumbprint
This commit is contained in:
parent
3879129674
commit
1a43a58af1
|
@ -188,7 +188,9 @@
|
|||
return OAUTH3.PromiseA.reject(new Error('JWK of type '+jwk.kty+' missing fields ' + missing));
|
||||
}
|
||||
|
||||
var jwkStr = '{' + keys.map(function (name) { return name+':'+jwk[name]; }).join(',') + '}';
|
||||
// I'm not actually 100% sure this behavior is guaranteed, but when we use an array as the
|
||||
// replacer argument the keys are always in the order they appeared in the array.
|
||||
var jwkStr = JSON.stringify(jwk, keys);
|
||||
return OAUTH3.crypto.core.sha256(OAUTH3._binStr.binStrToBuffer(jwkStr))
|
||||
.then(OAUTH3._base64.bufferToUrlSafe);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue