https://github.com/yussan/seal-middleware-npm
secure your api endpoint by limiting access over period of time.
https://github.com/yussan/seal-middleware-npm
npm seal seal-middleware
Last synced: 4 months ago
JSON representation
secure your api endpoint by limiting access over period of time.
- Host: GitHub
- URL: https://github.com/yussan/seal-middleware-npm
- Owner: yussan
- License: mit
- Created: 2018-03-18T02:28:16.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-18T08:27:06.000Z (over 5 years ago)
- Last Synced: 2025-02-08T05:02:09.679Z (4 months ago)
- Topics: npm, seal, seal-middleware
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/seal-middleware
- Size: 68.4 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/yussan/seal-middleware)
[](http://commitizen.github.io/cz-cli/)
# seal-middleware
secure your api endpoint by limiting access over period of time.## Instalation
using yarn or npm
```
npm install seal-middleware
```## How To Use
### Initial
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)
```### Available Commands
- Generate seal
```
const myseal = seal.generateSeal()
```
- Seal validation
```
const {is_valid} = seal.validate(grdasd65a6wudtwy786)
```## Samples
- Used on api endpoint
```
https://api.host.com/endpoint/:seal
```
If seal expired, response from api is `request invalid` or `forbidden access`.## Links
- 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## Contributors
- [yussan](https://yussan.github.io) : JS Developer
- [radudangratian](https://steemit.com/utopian-io/@radudangratian/logo-proposal-for-seal-middleware) : Logo creator