cisco / node-jose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

createSign() 'alg' option incorrectly documented

nderin opened this issue · comments

README.md states:

jose.JWS.createSign({ alg: 'PS256' }, key).
        update(input).
        final().
        then(function(result) {
          // ....
        });

But the 'alg' option does not appear to be used. Instead, it must be included in the 'fields' object:

jose.JWS.createSign({fields: { alg: 'PS256' }}, key).
        update(input).
        final().
        then(function(result) {
          // ....
        });

Unsure if you also maintain the typescript bindings, but alg? is specified in the options object there as well.

I confirmed that nderin's comment is true. Please fix the documentation :D