@3846masa/http-signature
Version:
Create / Verify HTTP Signatures (https://tools.ietf.org/html/draft-cavage-http-signatures-10)
11 lines (10 loc) • 465 B
TypeScript
export interface CreateSignatureOptions {
method: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
pathname: string;
headers: Record<string, any[] | any>;
properties: string[];
keyId: string;
privateKey: string;
algorithm: 'rsa-sha256';
}
export declare function createSignature({ method, pathname, properties, privateKey, algorithm, keyId, headers: rawHeaders, }: CreateSignatureOptions): string;