node-jws-jwk
This is basically just node-jws augmented so that
secretOrKey
can be a JWK or set of JWKs.
Install
$ npm install jws-jwk
Example
var jws = ; var signature = ;var jwk = kid: '1234' kty: 'RSA' n: '12345...XYZ=' e: 'AQAB' ; if jws // Do stuff here, signature was verified using the JWK
node-jws
OverridingYou might want to make it so when other code you are using does the following,
the module in the variable jws
is augmented.
var jws = ;
One reason to do this is to make modules using node-jws work with JWKs, e.g. jsonwebtoken. Requiring node-jws-jwk like so will add its augmented functions to the node-jws module:
var jws = ;
In-Browser Usage
This module shims in jsrsasign when browserified
to make jws.verify
work in-browser (with JWKs and normally).