Files
talk/src/types/jsonwebtoken.d.ts
T
2018-06-29 16:11:32 -06:00

20 lines
489 B
TypeScript

import { VerifyOptions, VerifyCallback } from "jsonwebtoken";
declare module "jsonwebtoken" {
export type KeyFunctionCallback = (
err: Error | null,
secretOrPublicKey?: string | Buffer
) => void;
export type KeyFunction = (
headers: { kid?: string },
callback: KeyFunctionCallback
) => void;
export function verify(
token: string,
secretOrPublicKey: string | Buffer | KeyFunction,
options?: VerifyOptions,
callback?: VerifyCallback
): void;
}