woops put headernames in wrong place
This commit is contained in:
parent
6ada10a340
commit
e80fdbfaf2
|
@ -6,7 +6,7 @@ declare module "activitypub-express" {
|
||||||
// Only enough here for what I need.
|
// Only enough here for what I need.
|
||||||
declare module "activitypub-http-signatures" {
|
declare module "activitypub-http-signatures" {
|
||||||
export class Sha256Signer {
|
export class Sha256Signer {
|
||||||
constructor(options: { publicKeyId: string, privateKey: string }, headerNames?: string[]);
|
constructor(options: { publicKeyId: string, privateKey: string, headerNames?: string[] });
|
||||||
|
|
||||||
sign: (options: { url: string, method: string, headers: any[] }) => string;
|
sign: (options: { url: string, method: string, headers: any[] }) => string;
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,8 +45,9 @@ export const signedFetch = async (url: string, init: RequestInit, signedInit: Si
|
||||||
|
|
||||||
const signer = new Sha256Signer({
|
const signer = new Sha256Signer({
|
||||||
privateKey: signedInit.privateKey,
|
privateKey: signedInit.privateKey,
|
||||||
publicKeyId: signedInit.keyId
|
publicKeyId: signedInit.keyId,
|
||||||
}, headerNames);
|
headerNames
|
||||||
|
});
|
||||||
|
|
||||||
const signature = signer.sign({
|
const signature = signer.sign({
|
||||||
url,
|
url,
|
||||||
|
|
Loading…
Reference in New Issue