secure your api endpoint by limiting access over period of time.
using yarn or npm
npm install seal-middleware
Import and initial seal module, setup your app key and expired time of seal.
import Seal from 'seal-middleware`
const seal = new Seal('your app key', 5000)
- Generate seal
const myseal = seal.generateSeal()
- Seal validation
const {is_valid} = seal.validate(grdasd65a6wudtwy786)
- Used on api endpoint
If seal expired, response from api is
https://api.host.com/endpoint/:seal
request invalid
orforbidden access
.
- Github : https://github.com/yussan/seal-middleware
- NPM : https://www.npmjs.com/package/seal-middleware
- Posted in Utopian.io : https://utopian.io/utopian-io/@yussan/seal-middleware-secure-your-api-endpoint-by-limiting-access-over-period-of-time
- yussan : JS Developer
- radudangratian : Logo creator