mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
simplify jwt-simple/jwt-simple.d.ts
This commit is contained in:
38
jwt-simple/jwt-simple.d.ts
vendored
38
jwt-simple/jwt-simple.d.ts
vendored
@@ -3,24 +3,20 @@
|
||||
// Definitions by: Ken Fukuyama <https://github.com/kenfdev>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
declare module "jwt-simple" {
|
||||
module jwtSimple {
|
||||
/**
|
||||
* Decode jwt
|
||||
* @param token
|
||||
* @param key
|
||||
* @param noVerify
|
||||
* @api public
|
||||
*/
|
||||
export function decode(token:any, key:string, noVerify?:boolean):any;
|
||||
/**
|
||||
* Encode jwt
|
||||
* @param payload
|
||||
* @param key
|
||||
* @param algorithm default is HS256
|
||||
* @api public
|
||||
*/
|
||||
export function encode(payload:any, key:string, algorithm?:string):string;
|
||||
}
|
||||
|
||||
export = jwtSimple;
|
||||
}
|
||||
/**
|
||||
* Decode jwt
|
||||
* @param token
|
||||
* @param key
|
||||
* @param noVerify
|
||||
* @api public
|
||||
*/
|
||||
export function decode(token:any, key:string, noVerify?:boolean):any;
|
||||
/**
|
||||
* Encode jwt
|
||||
* @param payload
|
||||
* @param key
|
||||
* @param algorithm default is HS256
|
||||
* @api public
|
||||
*/
|
||||
export function encode(payload:any, key:string, algorithm?:string):string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user