jws-lite
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

jws-lite

Install

npm install jws-lite

Usage

const jws = require('jws-lite')
 
const decoded = jws.decode('someJWS');
const {
  header,         // jose header 
  payload,        // payload as a binary string
  signedContent,  // UintArray of the signed content
  signature       // UintArray of the signature
= decoded;
 
jws.sign(payload, jwk)
.then(jwsToken => console.log(jwsToken))
 
jws.verify(jwsToken, jwk)
.then(payload => console.log(payload))

Can it be smaller?

If you use ES6 imports with a bundler that supports tree-shaking, yes!

import { sign } from 'jws-lite'

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i jws-lite

Weekly Downloads

25

Version

1.1.0

License

MIT

Unpacked Size

9.35 kB

Total Files

6

Last publish

Collaborators

  • kevlened