Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@nextwelve/redis-jwt
Advanced tools
The purpose of creating this package was to need a tool that would allow easy and correct management of tokens, as well as the ability to revoke them using a centralized mechanism. Over time, the package will be improved and further developed. Any constructive criticism and suggestions are still welcome. We always support the latest approaches to identity and authentication management and provide additional features that help make any application secure.
npm
npm install @nextwelve/redis-jwt
yarn
yarn add @nextwelve/redis-jwt
Register RedisJwt
instance:
import { RedisJwt, RedisPersistor } from '@nextwelve/redis-jwt';
const persistor = new RedisPersistor();
const rjwt = new RedisJwt({
persistor,
secret: 'mysecret'
});
Generate signed jwt token:
const id = rjwt.makeid(30);
const token = await rjwt.sign(id, {
dataToken: {
hello: 'token'
},
dataSession: {
hello: 'session'
}
});
Verify signed jwt token:
const id = rjwt.makeid(30);
const token = await rjwt.sign(id);
// false parameter strictly check the presence of the token in the storage itself
const decode = await rjwt.verify(token, false);
This repository is licensed under the "MIT" license. See LICENSE.
FAQs
Unknown package
The npm package @nextwelve/redis-jwt receives a total of 1 weekly downloads. As such, @nextwelve/redis-jwt popularity was classified as not popular.
We found that @nextwelve/redis-jwt demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.