Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
75 lines (53 sloc) 2.17 KB

Table of contents

index.ts

Functions

JWTOptional

function JWTOptional(options: JWTOptions = {}, verifyOptions: VerifyOptions = {}): HookDecorator;

Parameters

Name Type Default value
options JWTOptions {}
verifyOptions VerifyOptions {}

Return type

HookDecorator


JWTRequired

function JWTRequired(options: JWTOptions = {}, verifyOptions: VerifyOptions = {}): HookDecorator;

Parameters

Name Type Default value
options JWTOptions {}
verifyOptions VerifyOptions {}

Return type

HookDecorator

Interfaces

JWTOptions

interface JWTOptions {
    user?: ((id: string | number) => Promise<any>) | undefined;
    blackList?: ((token: string) => boolean | Promise<boolean>) | undefined;
    cookie?: boolean | undefined;
}

Properties

Name Type Optional
user ((id: string | number) => Promise) | undefined true
blackList ((token: string) => boolean | Promise) | undefined true
cookie boolean | undefined true