Options
All
  • Public
  • Public/Protected
  • All
Menu

Options for 'withJWT()' function.

Hierarchy

  • IWithJWTOptions

Index

Properties

Optional onUnauthorized

onUnauthorized: (request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, response: Response<any, Record<string, any>>) => any

The custom logic, if authorization failed.

param

The request context.

param

The response context.

Type declaration

    • (request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, response: Response<any, Record<string, any>>): any
    • Parameters

      • request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
      • response: Response<any, Record<string, any>>

      Returns any

Optional setupToken

setupToken: (token: any, request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, response: Response<any, Record<string, any>>) => any

The custom logic, to setup the verified token.

param

The decoded and verified token.

param

The request context.

param

The response context.

Type declaration

    • (token: any, request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, response: Response<any, Record<string, any>>): any
    • Parameters

      • token: any
      • request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
      • response: Response<any, Record<string, any>>

      Returns any

Generated using TypeDoc