passport-saml-metadata
Advanced tools
Comparing version 2.1.0 to 2.2.0
{ | ||
"name": "passport-saml-metadata", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"description": "SAML2 metadata loader", | ||
@@ -64,4 +64,4 @@ "author": { | ||
"lodash": "^4.17.15", | ||
"passport-saml": "^1.1.0", | ||
"xmldom": "^0.1.27", | ||
"passport-saml": "^1.2.0", | ||
"xmldom": "^0.2.1", | ||
"xpath": "0.0.27" | ||
@@ -71,7 +71,7 @@ }, | ||
"axios-mock-adapter": "^1.17.0", | ||
"eslint": "^6.1.0", | ||
"mocha": "^6.2.0", | ||
"nyc": "^14.1.1", | ||
"semistandard": "^13.0.1" | ||
"eslint": "^6.8.0", | ||
"mocha": "^6.2.2", | ||
"nyc": "^15.0.0", | ||
"semistandard": "^14.2.0" | ||
} | ||
} |
@@ -65,9 +65,13 @@ # passport-saml-metadata | ||
### toPassportConfig(reader) | ||
### toPassportConfig(reader, options = { multipleCerts: false }) | ||
Transforms metadata extracts for use in Passport strategy configuration. The following strategies are currently supported: | ||
* [passport-saml](http://npmjs.org/packages/passport-saml) | ||
* [passport-wsfed-saml2](http://npmjs.org/packages/passport-wsfed-saml2) | ||
* [passport-saml](http://npmjs.org/package/passport-saml) | ||
* [passport-wsfed-saml2](http://npmjs.org/package/passport-wsfed-saml2) | ||
Config: | ||
* `multipleCerts` (boolean): causes the full array of signing certificates to be passed to the passport config instead of assuming the last certificate is the most recent one. Note: this option is not compatible with [passport-wsfed-saml2](http://npmjs.org/package/passport-wsfed-saml2). | ||
### claimsToCamelCase(claims, claimSchema) | ||
@@ -74,0 +78,0 @@ |
const debug = require('debug')('passport-saml-metadata'); | ||
function toPassportConfig(reader = {}) { | ||
function toPassportConfig(reader = {}, options = { multipleCerts: false }) { | ||
const { identifierFormat, identityProviderUrl, logoutUrl, signingCerts } = reader; | ||
@@ -10,3 +10,3 @@ | ||
logoutUrl, | ||
cert: [].concat(signingCerts).pop(), // assumes the last cert is the most recent one | ||
cert: (!options.multipleCerts) ? [].concat(signingCerts).pop() : signingCerts, | ||
identifierFormat | ||
@@ -13,0 +13,0 @@ }; |
21184
128
+ Addedxmldom@0.2.1(transitive)
Updatedpassport-saml@^1.2.0
Updatedxmldom@^0.2.1