mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
25 lines
764 B
TypeScript
25 lines
764 B
TypeScript
// Type definitions for jwt-simple v0.5.0
|
|
// Project: https://github.com/hokaccha/node-jwt-simple
|
|
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>, Gael Magnan <https://github.com/GaelMagnan>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
declare module "jwt-simple" {
|
|
/**
|
|
* Decode jwt
|
|
* @param token
|
|
* @param key
|
|
* @param noVerify
|
|
* @param algorithm default is HS256
|
|
* @api public
|
|
*/
|
|
export function decode(token:any, key:string, noVerify?:boolean, algorithm?:string):any;
|
|
/**
|
|
* Encode jwt
|
|
* @param payload
|
|
* @param key
|
|
* @param algorithm default is HS256
|
|
* @param options
|
|
* @api public
|
|
*/
|
|
export function encode(payload:any, key:string, algorithm?:string, options?:any):string;
|
|
}
|