mirror of
https://github.com/netzbegruenung/meteor-accounts-saml.git
synced 2024-05-04 12:53:42 +02:00
Merge branch 'feature/PR_#27-MVA'
This commit is contained in:
commit
aa93e57c94
|
@ -1,7 +1,7 @@
|
|||
Package.describe({
|
||||
name:"steffo:meteor-accounts-saml",
|
||||
summary: "SAML Login (SP) for Meteor. Works with OpenAM, OpenIDP and provides Single Logout.",
|
||||
version: "0.0.14",
|
||||
version: "0.0.15",
|
||||
git: "https://github.com/steffow/meteor-accounts-saml.git"
|
||||
});
|
||||
|
||||
|
|
|
@ -431,7 +431,16 @@ SAML.prototype.validateResponse = function(samlResponse, relayState, callback) {
|
|||
}
|
||||
if (attributes) {
|
||||
for (let i = 0; i < attributes.length; i++) {
|
||||
const value = attributes[i].getElementsByTagNameNS('urn:oasis:names:tc:SAML:2.0:assertion', 'AttributeValue')[0];
|
||||
const values = attributes[i].getElementsByTagNameNS('urn:oasis:names:tc:SAML:2.0:assertion', 'AttributeValue');
|
||||
let value;
|
||||
if (values.length === 1) {
|
||||
value = values[0].textContent;
|
||||
} else {
|
||||
value = [];
|
||||
for (var attributeValue of values) {
|
||||
value.push(attributeValue.textContent);
|
||||
}
|
||||
}
|
||||
if (Meteor.settings.debug) {
|
||||
console.log("Name: " + attributes[i]);
|
||||
console.log(`Adding attrinute from SAML response to profile:` + attributes[i].getAttribute('Name') + " = " + value.textContent);
|
||||
|
|
Loading…
Reference in a new issue