mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 16:49:03 +08:00
20 lines
489 B
TypeScript
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;
|
|
}
|