jose
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|
jose
is a feature-packed JavaScript module designed for JSON Object Signing and Encryption. Covering a broad range of functionality, it supports JSON Web Tokens (JWT), JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and JSON Web Key Set (JWKS). This versatile module is built to operate across multiple web-interoperable runtimes, such as Node.js, browsers, Cloudflare Workers, Deno, Bun, and others. As a result, jose
serves as a comprehensive tool for developers working on data integrity and security in multiple runtime environments.
Using jose
involves installing the package via npm or other package managers and importing it into your project. For instance, in an ESM context, the import would look like this:
import * as jose from 'jose'
In a CommonJS context, it would be:
const jose = require('jose')
Once imported, jose
provides a multitude of functionalities, including JWT signing and verifying with the SignJWT
class and the jwtVerify
function respectively. For encrypted JWTs, use the EncryptJWT
class for encryption and the jwtDecrypt
function for decryption. You can also import, export, and generate keys using the module's key utility functions. The functionalities extend to JSON Web Signature (JWS) and JSON Web Encryption (JWE), as well as various other features.
For jose's
detailed documentation, you can refer to the links provided in the Readme file or visit the project's GitHub repository directly at https://github.com/panva/jose. Note that, for specific implementations like JWT, JWS, JWE, etc., the project provides individual documentation pages, each detailing the classes and functions related to those implementations.