Files
DefinitelyTyped/koa-jwt/index.d.ts
Bruno Krebs dab72c162f Adds type definition for koa-jwt (https://github.com/koajs/jwt) (#13440)
* 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.
2016-12-19 15:23:03 -08:00

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;
}
}