UNPKG

486 BTypeScriptView Raw
1import { SignOptions, Secret, VerifyOptions, DecodeOptions } from 'jsonwebtoken';
2import { FactoryProvider, Logger, LoggerService } from '@nestjs/common';
3export interface JwtOption {
4 secret: Secret;
5 sign?: SignOptions;
6 verify?: VerifyOptions;
7 decode?: DecodeOptions;
8 logger?: Logger | LoggerService;
9}
10export interface JwtAsyncOption {
11 name?: string;
12 useFactory: (...args: any[]) => Promise<JwtOption> | JwtOption;
13 inject?: FactoryProvider['inject'];
14}