jws-lite
isomorphic library to decode, sign, and verify JSON Web Signatures
Last updated a year ago by kevlened .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install jws-lite 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.1.0                                ...           latest (a year ago)

6 Versions

  • 1.1.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 1
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (9)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |