Comparing version 0.1.1 to 0.1.2
@@ -10,6 +10,4 @@ // Saml2js | ||
_ = require('lodash'), | ||
profile = {}, | ||
attributes; | ||
profile = {}; | ||
// Saml2js | ||
@@ -35,3 +33,3 @@ // ------- | ||
attributes = xpath.select('//*[local-name() = "AttributeStatement"]/*', doc); | ||
var attributes = xpath.select('//*[local-name() = "AttributeStatement"]/*', doc); | ||
attributes.forEach(function(attribute){ | ||
@@ -38,0 +36,0 @@ var name = xpath.select('string(@Name)', attribute); |
{ | ||
"name": "saml2js", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Parse SAML2 attributes into a JavaScript object.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# saml2js [![Build Status](https://travis-ci.org/Aplo/saml2js.svg?branch=master)](https://travis-ci.org/Aplo/saml2js) | ||
# saml2js [![npm version](https://badge.fury.io/js/saml2js.svg)](http://badge.fury.io/js/saml2js) [![Build Status](https://travis-ci.org/Aplo/saml2js.svg?branch=master)](https://travis-ci.org/Aplo/saml2js) | ||
@@ -13,2 +13,4 @@ > Parses SAML responses into JS objects you can read and manipulate. | ||
[![NPM](https://nodei.co/npm/saml2js.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/saml2js/) | ||
## Usage | ||
@@ -15,0 +17,0 @@ |
@@ -34,2 +34,22 @@ // Saml2js Tests | ||
describe('#parse()', function() { | ||
it('should parse base64 encoded SAML', function(done) { | ||
fs.readFile(__dirname + '/base64.saml', {encoding: 'utf8'}, function(err, saml) { | ||
if (err) done(err); | ||
var base64parser = new Saml2js(saml); | ||
expect(base64parser.toObject()).to.be.an('object'); | ||
done(); | ||
}); | ||
}); | ||
it('should contain the expected data', function(done) { | ||
fs.readFile(__dirname + '/base64.saml', {encoding: 'utf8'}, function(err, saml) { | ||
if (err) done(err); | ||
var base64parser = new Saml2js(saml); | ||
expect(base64parser.get('transfer type')).to.equal('Completed eligibility application'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
describe('#toJSON()', function() { | ||
@@ -36,0 +56,0 @@ it('should return a string', function() { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30776
11
174
131