Comparing version 3.0.1 to 3.1.0
@@ -496,3 +496,3 @@ // Generated by CoffeeScript 1.12.7 | ||
attribute_values = attribute.getElementsByTagNameNS(XMLNS.SAML, 'AttributeValue'); | ||
assertion_attributes[attribute_name] = _(attribute_values).map(function(attribute_value) { | ||
assertion_attributes[attribute_name] = _.map(attribute_values, function(attribute_value) { | ||
var ref2; | ||
@@ -527,3 +527,3 @@ return ((ref2 = attribute_value.childNodes[0]) != null ? ref2.data : void 0) || ''; | ||
}; | ||
return _(assertion_attributes).chain().pairs().filter(function(arg) { | ||
return _.chain(assertion_attributes).pairs().filter(function(arg) { | ||
var k, v; | ||
@@ -742,3 +742,3 @@ k = arg[0], v = arg[1]; | ||
this.alt_certs = [].concat(this.alt_certs || []); | ||
this.shared_options = _(options).pick("force_authn", "auth_context", "nameid_format", "sign_get_request", "allow_unencrypted_assertion", "audience", "notbefore_skew"); | ||
this.shared_options = _.pick(options, "force_authn", "auth_context", "nameid_format", "sign_get_request", "allow_unencrypted_assertion", "audience", "notbefore_skew"); | ||
} | ||
@@ -764,3 +764,3 @@ | ||
if (options.sign_get_request) { | ||
_(uri.query).extend(sign_request(deflated.toString('base64'), _this.private_key, options.relay_state)); | ||
_.extend(uri.query, sign_request(deflated.toString('base64'), _this.private_key, options.relay_state)); | ||
} else { | ||
@@ -817,3 +817,3 @@ uri.query.SAMLRequest = deflated.toString('base64'); | ||
var raw; | ||
raw = new Buffer(options.request_body.SAMLResponse || options.request_body.SAMLRequest, 'base64'); | ||
raw = Buffer.from(options.request_body.SAMLResponse || options.request_body.SAMLRequest, 'base64'); | ||
if (options.get_request) { | ||
@@ -820,0 +820,0 @@ return zlib.inflateRaw(raw, cb_wf); |
{ | ||
"name": "saml2-js", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "SAML 2.0 node helpers", | ||
@@ -5,0 +5,0 @@ "author": "Clever", |
@@ -0,1 +1,7 @@ | ||
# Maintenance Notice | ||
This library is currently in maintenance mode. Until further notice, the primary directive is to handle bug reports and security issues with this library. | ||
Any library alternatives and suggestions can be filed under an issue. | ||
# SAML2-js | ||
@@ -5,3 +11,3 @@ | ||
`saml2-js` is a node module that abstracts away the complexities of the SAML protocol behind an easy to use interface. | ||
`saml2-js` is a node module that abstracts away the complexities of the SAML protocol behind an easy to use interface. It achieves this this by helping you implement a service provider for the SAML protocol. It currently does not implement the features to act as an identity provider. | ||
@@ -233,6 +239,8 @@ ## Usage | ||
var app = express(); | ||
var bodyParser = require('body-parser'); | ||
app.use(bodyParser.urlencoded({ | ||
extended: true | ||
})); | ||
// If you're using express <4.0: | ||
// var bodyParser = require('body-parser'); | ||
// app.use(bodyParser.urlencoded({ | ||
// extended: true | ||
// })); | ||
app.use(express.urlencoded()); | ||
@@ -273,2 +281,5 @@ // Create service provider | ||
// Variables used in login/logout process | ||
var name_id, session_index; | ||
// Assert endpoint for when login completes | ||
@@ -286,3 +297,3 @@ app.post("/assert", function(req, res) { | ||
res.send("Hello #{saml_response.user.name_id}!"); | ||
res.send("Hello #{name_id}! session_index: #{session_index}."); | ||
}); | ||
@@ -289,0 +300,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
244237
50
315