/// import { NotRequestKey, Request } from "../../common"; import { VerifyOptions } from 'jsonwebtoken'; export type JwtFromRequestFunction = (req: Request) => unknown; export interface StrategyOptions { /** * symmetric key or public key of asymmetric key */ readonly secret: string | Buffer; /** * extract jwt from request, if a token not exist, return null. * @param req user's request context * @returns token or null */ readonly jwtFromRequest: readonly JwtFromRequestFunction[]; /** * jwt verify options */ readonly verifyOptions?: Omit; /** * request[key] refers to identity object. */ readonly key: NotRequestKey; }