mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 10:35:22 +08:00
* Adding type definition for https://github.com/koajs/jwt * Adding lint and fixing issues reported by it * fixig issues * fixing koa-jwt test * Fixing tslint config and jwt return type. * Updating code based on @andy-ms comments.
22 lines
564 B
TypeScript
22 lines
564 B
TypeScript
// Type definitions for koa-jwt 2.1
|
|
// Project: https://github.com/koajs/jwt
|
|
// Definitions by: Bruno Krebs <https://github.com/brunokrebs/>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
import Koa = require("koa");
|
|
|
|
export = jwt;
|
|
|
|
declare function jwt(options: jwt.Options): Koa.Middleware;
|
|
|
|
declare namespace jwt {
|
|
export interface Options {
|
|
secret: string | Buffer;
|
|
key?: string;
|
|
getToken?: (opts: jwt.Options) => string;
|
|
passthrough?: boolean;
|
|
cookie?: string;
|
|
debug?: boolean;
|
|
}
|
|
}
|