@nestjs/jwt
- Version 11.0.1
- Published
- 51.7 kB
- 2 dependencies
- MIT license
Install
npm i @nestjs/jwtyarn add @nestjs/jwtpnpm add @nestjs/jwtOverview
Nest - modern, fast, powerful node.js web framework (@jwt)
Index
Classes
Interfaces
Enums
Type Aliases
Classes
class JwtModule
class JwtModule {}method register
static register: (options: JwtModuleOptions) => DynamicModule;method registerAsync
static registerAsync: (options: JwtModuleAsyncOptions) => DynamicModule;class JwtService
class JwtService {}constructor
constructor(options?: JwtModuleOptions);method decode
decode: <T = any>(token: string, options?: jwt.DecodeOptions) => T;method sign
sign: { ( payload: string, options?: Omit<JwtSignOptions, keyof jwt.SignOptions> ): string; (payload: Buffer, options?: JwtSignOptions): string; <T extends object = any>(payload: T, options?: JwtSignOptions): string;};method signAsync
signAsync: { ( payload: string, options?: Omit<JwtSignOptions, keyof jwt.SignOptions> ): Promise<string>; (payload: Buffer, options?: JwtSignOptions): Promise<string>; <T extends object = any>( payload: T, options?: JwtSignOptions ): Promise<string>;};method verify
verify: <T extends object = any>(token: string, options?: JwtVerifyOptions) => T;method verifyAsync
verifyAsync: <T extends object = any>( token: string, options?: JwtVerifyOptions) => Promise<T>;class WrongSecretProviderError
class WrongSecretProviderError extends Error {}Interfaces
interface JwtModuleAsyncOptions
interface JwtModuleAsyncOptions extends Pick<ModuleMetadata, 'imports'> {}property extraProviders
extraProviders?: Provider[];property global
global?: boolean;property inject
inject?: any[];property useClass
useClass?: Type<JwtOptionsFactory>;property useExisting
useExisting?: Type<JwtOptionsFactory>;property useFactory
useFactory?: (...args: any[]) => Promise<JwtModuleOptions> | JwtModuleOptions;interface JwtModuleOptions
interface JwtModuleOptions {}property global
global?: boolean;property privateKey
privateKey?: jwt.Secret;property publicKey
publicKey?: jwt.Secret;property secret
secret?: jwt.Secret;property secretOrKeyProvider
secretOrKeyProvider?: ( requestType: JwtSecretRequestType, tokenOrPayload: string | object | Buffer, options?: jwt.VerifyOptions | jwt.SignOptions) => jwt.Secret | Promise<jwt.Secret>;property secretOrPrivateKey
secretOrPrivateKey?: jwt.Secret;property signOptions
signOptions?: jwt.SignOptions;property verifyOptions
verifyOptions?: jwt.VerifyOptions;interface JwtOptionsFactory
interface JwtOptionsFactory {}method createJwtOptions
createJwtOptions: () => Promise<JwtModuleOptions> | JwtModuleOptions;interface JwtSignOptions
interface JwtSignOptions extends jwt.SignOptions {}property privateKey
privateKey?: jwt.Secret;property secret
secret?: string | Buffer;interface JwtVerifyOptions
interface JwtVerifyOptions extends jwt.VerifyOptions {}Enums
enum JwtSecretRequestType
enum JwtSecretRequestType { SIGN = 0, VERIFY = 1,}Type Aliases
type GetSecretKeyResult
type GetSecretKeyResult = string | Buffer | jwt.Secret;Package Files (5)
Dependencies (2)
Dev Dependencies (23)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@nestjs/jwt.
- Markdown[](https://www.jsdocs.io/package/@nestjs/jwt)
- HTML<a href="https://www.jsdocs.io/package/@nestjs/jwt"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3822 ms. - Missing or incorrect documentation? Open an issue for this package.
