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