Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mmraisi/jwt-warden
jwt-warden is a comprehensive Node.js package for JSON Web Token (JWT)
https://github.com/mmraisi/jwt-warden
authentication jwt jwt-authentication jwt-token
Last synced: 4 months ago
JSON representation
jwt-warden is a comprehensive Node.js package for JSON Web Token (JWT)
- Host: GitHub
- URL: https://github.com/mmraisi/jwt-warden
- Owner: mmraisi
- License: mit
- Created: 2024-03-22T02:06:51.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-09-17T14:47:29.000Z (4 months ago)
- Last Synced: 2024-09-17T18:30:28.737Z (4 months ago)
- Topics: authentication, jwt, jwt-authentication, jwt-token
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/jwt-warden
- Size: 1010 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jwt-warden
jwt-warden is a comprehensive Node.js package for JSON Web Token (JWT) authentication and authorization, designed to simplify securing backend services with JWT-based authentication.
## Installation
You can install jwt-warden using npm:
```bash
npm install jwt-warden
```Once installed, you can import and use jwt-warden in your Node.js application as follows:
```js
// Import jwt-warden methods
const { sign, decode, verify } = require("jwt-warden");// Example usage
const token = sign({ userId: "123456" }, "your_secret_key");
console.log("Generated token:", token);const decodedToken = decode(token);
console.log("Decoded token:", decodedToken);const isValid = verify(token, "your_secret_key");
console.log("Token verification result:", isValid);
```Replace 'your_secret_key' with your actual secret key used for JWT signing and verification.
## Contributing
Contributions are welcome! Please see our contribution guidelines for more information.
## License
This project is licensed under the [MIT License](/LICENSE).