ensure-token
v1.0.5
Published
A package for ensuring bearer token is available in the header of the HTTP Request using Express
Downloads
8
Maintainers
Readme
Ensure Token
A package for ensuring bearer token is available in the header of the HTTP Request using Express
Installation
npm install ensure-token --save
OR
yarn add ensure-token
OR
pnpm install ensure-token
Usage
javascript or typescript
import { ensureToken } from 'ensure-token';
Add the ensureToken in your route like this:
app.get('/your-route', ensureToken, (req, res) => {
})
This will work on bearer tokens only for now. More Verifications will be added later.
Don't forget to like this repo. If you have any questions feel free to ask!
Created by Ethern Myth
Licensed under the MIT license.