Gathering detailed insights and metrics for paseto
Gathering detailed insights and metrics for paseto
Gathering detailed insights and metrics for paseto
Gathering detailed insights and metrics for paseto
npm install paseto
98.6
Supply Chain
100
Quality
76
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
456 Stars
154 Commits
27 Forks
7 Watching
6 Branches
5 Contributors
Updated on 22 Nov 2024
JavaScript (95.95%)
TypeScript (4.05%)
Cumulative downloads
Total Downloads
Last day
-14.9%
5,659
Compared to previous day
Last week
5.6%
35,354
Compared to previous week
Last month
31.7%
132,331
Compared to previous month
Last year
-11.7%
1,565,139
Compared to previous year
6
PASETO: Platform-Agnostic SEcurity TOkens for Node.js with no dependencies.
v1 | v2 | v3 | v4 | |
---|---|---|---|---|
local | ✅ | ❌ | ✅ | ❌ |
public | ✅ | ✅ | ✅ | ✅ |
If you or your business use paseto, please consider becoming a sponsor so I can continue maintaining it and adding new features carefree.
Installing paseto
1npm install paseto
Usage
1const paseto = require('paseto') 2 3// Generic (all versions) APIs 4const { decode } = paseto 5 6// PASETO Protocol Version v1 specific API 7const { V1 } = paseto // { sign, verify, encrypt, decrypt, generateKey } 8 9// PASETO Protocol Version v2 specific API 10const { V2 } = paseto // { sign, verify, generateKey } 11 12// PASETO Protocol Version v3 specific API 13const { V3 } = paseto // { sign, verify, encrypt, decrypt, generateKey } 14 15// PASETO Protocol Version v4 specific API 16const { V4 } = paseto // { sign, verify, generateKey } 17 18// errors utilized by paseto 19const { errors } = paseto
1const { V4: { sign } } = paseto 2 3(async () => { 4 { 5 const token = await sign({ sub: 'johndoe' }, privateKey) 6 // v4.public.eyJzdWIiOiJqb2huZG9lIiwiaWF0IjoiMjAyMS0wOC0wM1QwNTozOTozNy42NzNaIn3AW3ri7P5HpdakJmZvhqssz7Wtzi2Rb3JafwKplLoCWuMkITYOo5KNNR5NMaeAR6ePZ3xWUcbO0R11YLb02awO 7 } 8})()
1const { V4: { verify } } = paseto 2 3(async () => { 4 { 5 const payload = await verify(token, publicKey) 6 // { sub: 'johndoe', iat: '2019-07-01T15:22:47.982Z' } 7 } 8})()
Version | Security Fixes 🔑 | Other Bug Fixes 🐞 | New Features ⭐ | Node.js version supported |
---|---|---|---|---|
3.x.x | ✅ | ✅ | ✅ | >= 16.0.0 |
2.x.x | ✅ | ❌ | ❌ | ^12.19.0 || >=14.15.0 |
1.x.x | ✅ | ❌ | ❌ | >= 12.0.0 |
Yes. Everything that's either exported in the TypeScript definitions file or documented is subject to Semantic Versioning 2.0.0. The rest is to be considered private API and is subject to change between any versions.
It is only built for Node.js environment versions >=16.0.0
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
3 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 6
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
3 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
Found 2/23 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More