Parameters
- req: {
body?: string | Uint8Array<ArrayBufferLike>;
created?: number;
headers?: Record<string, string>;
key: {
thumbprint: string;
sign(data: Uint8Array): Promise<Uint8Array<ArrayBufferLike>>;
};
label?: string;
method: string;
nonce?: string;
url: string;
}
Returns Promise<Record<string, string>>
the headers to add: signature, signature-input, and
content-digest when there is content
Signs a request for GNAP's
httpsigproof (RFC 9635 section 7.3.1). The signature covers@method,@target-uri,content-digestwhen there is content, andauthorizationwhen an access token is presented, withcreated, a freshnonce, the key'skeyidand thegnaptag.