Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for enc? (encryption) #204

Closed
scniro opened this issue May 21, 2016 · 1 comment
Closed

Support for enc? (encryption) #204

scniro opened this issue May 21, 2016 · 1 comment

Comments

@scniro
Copy link

scniro commented May 21, 2016

Is there a native way to encrypt these? According to the spec, native encryption is a possibility. Am I doing something wrong here?

var cert = fs.readFileSync('./priv.pem');
var token = jwt.sign({ foo: 'bar' }, cert, {'enc': 'A128CBC-HS256'});

throws the following error...

"enc" is not allowed

@tcd156
Copy link

tcd156 commented May 31, 2016

'enc' isn't passed through in this library. This is using an implementation of JWS which does not support encryption.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants