Skip to content

Commit

Permalink
Merge pull request #18 from auth0gnarea/node6
Browse files Browse the repository at this point in the history
Make compatible with Node 6 and 8
  • Loading branch information
Marcos Castany authored Feb 27, 2018
2 parents b2f0c77 + 414958e commit fa57a98
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: node_js
before_install: npm i -g [email protected]
node_js:
- 0.8
- 4
- 6
- 8
2 changes: 1 addition & 1 deletion lib/encoders.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var thumbprint = require('thumbprint');
var thumbprint = require('@auth0/thumbprint');

var removeHeaders = module.exports.removeHeaders = function (cert) {
var pem = /-----BEGIN (\w*)-----([^-]*)-----END (\w*)-----/g.exec(cert.toString());
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
"author": "Auth0",
"license": "mit",
"dependencies": {
"@auth0/thumbprint": "0.0.6",
"ejs": "2.5.5",
"jsonwebtoken": "~5.0.4",
"saml": "^0.12.1",
"thumbprint": "0.0.1"
"saml": "^0.12.1"
},
"devDependencies": {
"chai": "~1.5.0",
Expand Down
14 changes: 14 additions & 0 deletions test/encoders.tests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

const assert = require('assert');
const encoders = require('../lib/encoders');
const fixtures = require('./fixture/server');

describe('encoders', function () {
describe('thumbprint', function () {
it('should return the thumbprint in all caps', function () {
const certThumbprint = encoders.thumbprint(fixtures.credentials.cert);
assert.equal(certThumbprint, '499FDF1C2218A99C8595AAC2FD95CE36F0A6D59D');
});
});
});

0 comments on commit fa57a98

Please sign in to comment.