kjur / jsjws

(IMPORTANT NOTICE: END OF SUPPORT! jsjws have been merged into http://kjur.github.io/jsrsasign/. So please move to jsrsasign. The 'jsjws' is a pure JavaScript implementation of JSON Web Signature(JWS) and JSON Web Token(JWT).
http://kjur.github.io/jsjws/
Other
227 stars 47 forks source link

Update kjur.github.io demos to use jws-3.0.js #15

Closed alexanderkjeldaas closed 9 years ago

alexanderkjeldaas commented 10 years ago

The demos don't use jws 3.0 so for example ES384 seems to not work.

I'm also getting a

Error: TypeError: Cannot read property 'bitLength' of undefined

when using the demo with one of the ES384 test vectors. The library should be more robust against these kinds of errors. The test vectors:

https://github.com/kjur/jsjws/blob/master/test/qunit-do-jws-sign.html#L394

-----BEGIN PUBLIC KEY----- MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEVDUmq9/Ec5Sj8mRbDUhlGp86TUbYdAvj IpFRB/BQJQxzDKQLN+HcheCCtLsYG4hHvW0Poni65escBUdMmk4r7sKMlwvknBlJ 8J6Wl5onelFIMOMqW53h7GirmfSS3TAK -----END PUBLIC KEY-----

and

eyJhbGciOiJFUzM4NCIsICJjdHkiOiJKV1QifQ.eyJhZ2UiOiAyMX0.ImFmrFvzlyl-BGHz8sdD6we6T1uCL5d6Q-oCWmDSh-q8eSL1bxPix7XZjxZGYJySw1On974Vw2NmzffgXvDPk7Ayvau0_fp0v4KUh4x6RcGKZDQgXVli1mfrGKTFP37C

kjur commented 9 years ago

Thank you for your report. I've fixed it in release 3.2.0 today.