UNPKG

mock-jwks

Version:

A tool to mock a JWKS for development of microservices who consume jwts signed with RSA

21 lines (19 loc) 603 B
import { JwtPayload } from "jsonwebtoken"; import { HttpHandler } from "msw"; export type { JwtPayload } from 'jsonwebtoken'; export const createJWKSMock: (jwksBase: string, jwksPath?: string) => { start: () => () => void; /** * @deprecated Use the thunk returned by `start` instead. */ stop: () => void; kid: () => string; token: (token?: JwtPayload) => string; mswHandler: HttpHandler; }; export type JWKSMock = ReturnType<typeof createJWKSMock>; /** * @deprecated Use the named export instead */ export default createJWKSMock; //# sourceMappingURL=types.d.ts.map