Built with 🦀🕸 by Achmad Kurnianto
PASETO is everything you love about JOSE (JWT, JWE, JWS) without any of the many design deficits that plague the JOSE standards. According to the paseto.io website, there is no PASETO library supported for JavaScript browsers yet. Library paseto from Filip Skokan only supports nodejs, and paseto.js from Samuel Judson from now uses deprecated versions 1 and 2 implementations of PASETO.
Luckily, there are PASETO libraries implemented with the rust programming language, which can be compiled into WebAssembly. One of them is pasetors from Johannes, which has WASM support but is not fully tested.
The creator of pasetors also lacks experience using JavaScript programming language and publishing it to the npm registry. I hope this crate will help him and improve WASM support of pasetors.
This crate will produce 2 separate npm libraries each called @achmadk/pasetors-wasm (support JavaScript browser) and @achmadk/pasetors-wasm-node (support nodejs).
yarn add @achmadk/pasetors-wasm # for browser, or
yarn add @achmadk/pasetors-wasm-node # for nodejsv4.localToken.encryptv4.localToken.decryptv4.publicToken.signv4.publicToken.verify
wasm-pack build --release -t web -s achmadk --out-dir pkg/pasetors-wasm --out-name pasetors-wasm # for browser
wasm-pack build --release -t nodejs -s achmadk --out-dir pkg/pasetors-wasm-node --out-name pasetors-wasm-node # for nodejswasm-pack test --headless
wasm-pack test --chrome --firefox
wasm-pack test --node
For more information about contributing, please read this file
wasm-bindgenfor communicating between WebAssembly and JavaScript.console_error_panic_hookfor logging panic messages to the developer console.wee_alloc, an allocator optimized for small code size.pasetorsfor implementing PASETO with rust programming language.