【文件属性】:
文件名称:jwt-js:在您的项目上管理JWT服务
文件大小:9KB
文件格式:ZIP
更新时间:2024-04-10 19:31:43
TypeScript
@buuhv/jwt-js
JWT是用于管理应用程序会话的服务类
入门
npm install @buuhv/jwt-js --save
用法
import JWT from '@buuhv/jwt-js' ;
const jwtService = new JWT ( 'SECRET_KEY' , 'ISS' ) ;
//expires is optional and you can use any value inside object
const newToken = jwtService . register ( {
expires : new Date ( ) . getTime ( ) 'optional'
'OBJECT DATA'
} ) ;
const isValid = jwtService . checkJWT ( 'OBJECT WITH HEAD
【文件预览】:
jwt-js-main
----.gitignore(39B)
----package.json(2KB)
----src()
--------lib()
----LICENSE(1KB)
----index.js(8KB)
----tsconfig.json(276B)
----index.js.map(5KB)
----README.md(1KB)
----index.d.ts(2KB)