mirror of
https://github.com/wassname/talk.git
synced 2026-07-02 21:23:06 +08:00
b916914faa
* feat: support dual sso/jwt auth * feat: move verifier logic to seperate strategy * fix: adjusted tests and removed aud claim * fix: cleanup
20 lines
500 B
TypeScript
20 lines
500 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
|
|
): object | string;
|
|
}
|