talelin / lin-cms-koa-core Goto Github PK
View Code? Open in Web Editor NEWA simple and practical CMS implememted by koa
Home Page: https://talelin.github.io/lin-cms-koa-core/index.html
License: MIT License
A simple and practical CMS implememted by koa
Home Page: https://talelin.github.io/lin-cms-koa-core/index.html
License: MIT License
Line 275 in 52591ea
lin-cms-koa-core/lib/interface.ts
Line 36 in 351f4a1
User 里flask版是返回 super, 此版 为admin字段,这会让isSuper判断失效。
Line 108 in 351f4a1
这儿要用工厂模式,否则accessExp 是服务启动时生成值,以后固定不变。 改为(js):
const jwt = ()=> {
return new Token(
config.getItem("secret"),
config.getItem("accessExp"),
config.getItem("refreshExp")
)
}
引用jwt改:
jwt().createAccessToken(user.id)
如果改accessExp=60 * 60; // 1h; 虽可行,但Token类的意义偏离了,应每个token的实例不同,才能准确表达token对象定义。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.