Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
compwright committed Jun 6, 2018
1 parent 470b23c commit 455221b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 34 deletions.
25 changes: 13 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "./lib/passport-wsfed-saml2",
"dependencies": {
"cryptiles": "~0.2.2",
"ejs": "2.5.5",
"ejs": "^2.6.1",
"jsonwebtoken": "~5.0.4",
"passport-strategy": "^1.0.0",
"uid2": "0.0.x",
Expand All @@ -30,20 +30,21 @@
"xml2js": "0.1.x",
"xmldom": "auth0/xmldom#v0.1.19-auth0_1",
"xpath": "0.0.5",
"xtend": "~2.0.3"
"xtend": "^4.0.1"
},
"devDependencies": {
"chai": "2.x.x",
"chai-passport-strategy": "1.x.x",
"cheerio": "~0.19.0",
"express": "~3.1.0",
"mocha": "~1.8.1",
"passport": "^0.3.2",
"request": "~2.14.0",
"saml": "~0.4.4",
"samlp": "~0.4.3",
"body-parser": "^1.18.3",
"chai": "^2.3.0",
"chai-passport-strategy": "^1.0.1",
"cheerio": "^0.22.0",
"express": "^4.16.3",
"mocha": "^5.2.0",
"passport": "^0.4.0",
"request": "^2.87.0",
"saml": "^0.12.4",
"samlp": "^3.4.0",
"should": "~1.1.0",
"wsfed": "~0.3.5"
"wsfed": "^4.0.0"
},
"engines": {
"node": ">= 0.6.0"
Expand Down
17 changes: 8 additions & 9 deletions test/fixture/samlp-server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var express = require('express');
var bodyParser = require('body-parser');
var http = require('http');
var samlp = require('samlp');
var xtend = require('xtend');
Expand Down Expand Up @@ -295,14 +296,12 @@ module.exports.start = function(options, callback){

var app = express();

app.configure(function(){
this.use(express.bodyParser());
this.use(passport.initialize());
this.use(passport.session());
this.use(function(req,res,next){
req.user = fakeUser;
next();
});
app.use(bodyParser.urlencoded({ extended: false }));
app.use(passport.initialize());
app.use(passport.session());
app.use(function(req,res,next){
req.user = fakeUser;
next();
});

function getPostURL (audience, samlRequestDom, req, callback) {
Expand Down Expand Up @@ -407,7 +406,7 @@ module.exports.start = function(options, callback){
app.post('/callback/samlp-with-invalid-xml',
function (req, res, next) {
passport.authenticate('samlp-with-utf8', { protocol: 'samlp' }, function(err, user, info) {
res.send(400, { message: err.message });
res.status(400).send({ message: err.message });
})(req, res, next);
},
function(req, res) {
Expand Down
17 changes: 8 additions & 9 deletions test/fixture/wsfed-server.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var express = require('express');
var bodyParser = require('body-parser');
var http = require('http');
var wsfed = require('wsfed');
var xtend = require('xtend');
Expand Down Expand Up @@ -59,14 +60,12 @@ module.exports.start = function(options, callback){

var app = express();

app.configure(function(){
this.use(express.bodyParser());
this.use(passport.initialize());
this.use(passport.session());
this.use(function(req,res,next){
req.user = fakeUser;
next();
});
app.use(bodyParser.urlencoded({ extended: false }));
app.use(passport.initialize());
app.use(passport.session());
app.use(function(req,res,next){
req.user = fakeUser;
next();
});

function getPostURL (wtrealm, wreply, req, callback) {
Expand All @@ -84,7 +83,7 @@ module.exports.start = function(options, callback){
app.post('/callback/wresult-with-invalid-xml',
function (req, res, next) {
passport.authenticate('wsfed-saml2', function(err, user, info) {
res.send(400, { message: err.message });
res.status(400).send({ message: err.message });
})(req, res, next);
},
function(req, res) {
Expand Down
2 changes: 1 addition & 1 deletion test/saml11.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('saml 1.1 assertion', function () {
const saml_passport = new SamlPassport(options);
const profile = saml_passport.validateSamlAssertion(signedAssertion, function(err, profile) {
should.exists(err);
assert.equal('The signing certificate is invalid (PEM_read_bio_PUBKEY failed)', err.message);
assert.equal('error:0D07209B:asn1 encoding routines:ASN1_get_object:too long', err.message);
done();
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/saml20.tests.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test/samlp.functional.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ describe('samlp (functional tests)', function () {

it('should post to idp', function(){
expect(r.statusCode).to.equal(200);
expect(r.headers['content-type']).to.equal('text/html');
expect(r.headers['content-type']).to.equal('text/html');
expect(r.headers['content-type']).to.equal('text/html; charset=utf-8');
expect(r.headers['content-type']).to.equal('text/html; charset=utf-8');
expect($('form').attr('action')).to.equal('http://localhost:5051/samlp');
});

Expand Down

0 comments on commit 455221b

Please sign in to comment.