You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
433 B

  1. var jwt = require('../');
  2. describe('issue 70 - public key start with BEING PUBLIC KEY', function () {
  3. it('should work', function (done) {
  4. var fs = require('fs');
  5. var cert_pub = fs.readFileSync(__dirname + '/rsa-public.pem');
  6. var cert_priv = fs.readFileSync(__dirname + '/rsa-private.pem');
  7. var token = jwt.sign({ foo: 'bar' }, cert_priv, { algorithm: 'RS256'});
  8. jwt.verify(token, cert_pub, done);
  9. });
  10. });