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

saml2-js

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

saml2-js - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

23

lib-js/saml2.js

@@ -38,4 +38,14 @@ // Generated by CoffeeScript 1.7.1

create_authn_request = function(issuer, assert_endpoint, destination) {
var id, xml;
create_authn_request = function(issuer, assert_endpoint, destination, force_authn, context) {
var context_element, id, xml;
if (context != null) {
context_element = _(context.class_refs).map(function(class_ref) {
return {
'saml:AuthnContextClassRef': class_ref
};
});
context_element.push({
'@Comparison': context.comparison
});
}
id = '_' + crypto.randomBytes(21).toString('hex');

@@ -52,2 +62,3 @@ xml = xmlbuilder.create({

'@ProtocolBinding': 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST',
'@ForceAuthn': force_authn,
'saml:Issuer': issuer,

@@ -57,3 +68,4 @@ NameIDPolicy: {

'@AllowCreate': 'true'
}
},
RequestedAuthnContext: context_element
}

@@ -409,6 +421,7 @@ }).end();

ServiceProvider.prototype.create_login_url = function() {
var assert_endpoint, cb, id, identity_provider, relay_state, xml, _i, _ref;
var assert_endpoint, cb, id, identity_provider, options, relay_state, xml, _i, _ref;
identity_provider = arguments[0], assert_endpoint = arguments[1], relay_state = 4 <= arguments.length ? __slice.call(arguments, 2, _i = arguments.length - 1) : (_i = 2, []), cb = arguments[_i++];
options = relay_state[1];
relay_state = relay_state[0];
_ref = create_authn_request(this.issuer, assert_endpoint, identity_provider.sso_login_url), id = _ref.id, xml = _ref.xml;
_ref = create_authn_request(this.issuer, assert_endpoint, identity_provider.sso_login_url, options != null ? options.force_authn : void 0, options != null ? options.context : void 0), id = _ref.id, xml = _ref.xml;
return zlib.deflateRaw(xml, function(err, deflated) {

@@ -415,0 +428,0 @@ var uri;

{
"name": "saml2-js",
"version": "0.3.0",
"version": "0.4.0",
"description": "SAML 2.0 node helpers",

@@ -5,0 +5,0 @@ "author": "Clever",

Sorry, the diff of this file is not supported yet

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