Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

saml2js

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saml2js - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

test/base64.saml

6

index.js

@@ -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() {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc