mirror of
https://github.com/netzbegruenung/meteor-accounts-saml.git
synced 2024-04-30 19:04:53 +02:00
v 0.0.13 - now support SAML attributes to be pushed into meteor profile
This commit is contained in:
parent
835cc6fc34
commit
3e509b8e09
30
.npm/package/npm-shrinkwrap.json
generated
30
.npm/package/npm-shrinkwrap.json
generated
|
@ -220,22 +220,36 @@
|
|||
"xml-crypto": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-0.9.0.tgz",
|
||||
"from": "xml-crypto@0.9.0"
|
||||
"from": "xml-crypto@0.9.0",
|
||||
"dependencies": {
|
||||
"xmldom": {
|
||||
"version": "0.1.19",
|
||||
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz",
|
||||
"from": "xmldom@0.1.19"
|
||||
}
|
||||
}
|
||||
},
|
||||
"xml2js": {
|
||||
"version": "0.4.17",
|
||||
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.17.tgz",
|
||||
"from": "xml2js@0.4.17"
|
||||
"from": "xml2js@0.4.17",
|
||||
"dependencies": {
|
||||
"xmlbuilder": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz",
|
||||
"from": "xmlbuilder@>=4.1.0 <5.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"xmlbuilder": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz",
|
||||
"from": "xmlbuilder@>=4.1.0 <5.0.0"
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.0.tgz",
|
||||
"from": "xmlbuilder@9.0.0"
|
||||
},
|
||||
"xmldom": {
|
||||
"version": "0.1.19",
|
||||
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.19.tgz",
|
||||
"from": "xmldom@0.1.19"
|
||||
"version": "0.1.27",
|
||||
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
|
||||
"from": "xmldom@0.1.27"
|
||||
},
|
||||
"xpath": {
|
||||
"version": "0.0.24",
|
||||
|
|
48
.versions
48
.versions
|
@ -1,27 +1,29 @@
|
|||
accounts-base@1.2.17
|
||||
allow-deny@1.0.5
|
||||
accounts-base@1.3.1
|
||||
allow-deny@1.0.6
|
||||
autoupdate@1.3.12
|
||||
babel-compiler@6.18.2
|
||||
babel-compiler@6.19.4
|
||||
babel-runtime@1.0.1
|
||||
base64@1.0.10
|
||||
binary-heap@1.0.10
|
||||
blaze@2.3.2
|
||||
blaze-tools@1.0.10
|
||||
boilerplate-generator@1.0.11
|
||||
boilerplate-generator@1.1.1
|
||||
caching-compiler@1.1.9
|
||||
caching-html-compiler@1.0.7
|
||||
callback-hook@1.0.10
|
||||
check@1.2.5
|
||||
coffeescript@1.0.17
|
||||
ddp@1.2.5
|
||||
ddp-client@1.3.4
|
||||
ddp-common@1.2.8
|
||||
ddp@1.3.0
|
||||
ddp-client@2.0.0
|
||||
ddp-common@1.2.9
|
||||
ddp-rate-limiter@1.0.7
|
||||
ddp-server@1.3.14
|
||||
ddp-server@2.0.0
|
||||
deps@1.0.12
|
||||
diff-sequence@1.0.7
|
||||
ecmascript@0.7.3
|
||||
ecmascript-runtime@0.3.15
|
||||
ecmascript@0.8.1
|
||||
ecmascript-runtime@0.4.1
|
||||
ecmascript-runtime-client@0.4.3
|
||||
ecmascript-runtime-server@0.4.1
|
||||
ejson@1.0.13
|
||||
geojson-utils@1.0.10
|
||||
html-tools@1.0.11
|
||||
|
@ -29,14 +31,14 @@ htmljs@1.0.11
|
|||
http@1.2.12
|
||||
id-map@1.0.9
|
||||
jquery@1.11.10
|
||||
local-test:steffo:meteor-accounts-saml@0.0.12
|
||||
localstorage@1.0.12
|
||||
local-test:steffo:meteor-accounts-saml@0.0.13
|
||||
localstorage@1.1.0
|
||||
logging@1.1.17
|
||||
meteor@1.6.1
|
||||
minimongo@1.0.23
|
||||
modules@0.8.2
|
||||
modules-runtime@0.7.10
|
||||
mongo@1.1.17
|
||||
meteor@1.7.0
|
||||
minimongo@1.2.1
|
||||
modules@0.9.2
|
||||
modules-runtime@0.8.0
|
||||
mongo@1.1.19
|
||||
mongo-id@1.0.6
|
||||
npm-mongo@2.2.24
|
||||
observe-sequence@1.0.16
|
||||
|
@ -46,7 +48,7 @@ practicalmeteor:loglevel@1.2.0_2
|
|||
practicalmeteor:mocha@2.4.5_2
|
||||
practicalmeteor:mocha-core@0.1.4
|
||||
practicalmeteor:sinon@1.14.1_2
|
||||
promise@0.8.8
|
||||
promise@0.8.9
|
||||
random@1.0.10
|
||||
rate-limit@1.0.8
|
||||
reactive-var@1.0.11
|
||||
|
@ -54,15 +56,15 @@ reload@1.1.11
|
|||
retry@1.0.9
|
||||
routepolicy@1.0.12
|
||||
service-configuration@1.0.11
|
||||
spacebars@1.0.12
|
||||
spacebars-compiler@1.1.0
|
||||
steffo:meteor-accounts-saml@0.0.12
|
||||
spacebars@1.0.15
|
||||
spacebars-compiler@1.1.2
|
||||
steffo:meteor-accounts-saml@0.0.13
|
||||
templating@1.1.14
|
||||
templating-tools@1.1.1
|
||||
tmeasday:test-reporter-helpers@0.2.1
|
||||
tracker@1.1.3
|
||||
ui@1.0.11
|
||||
ui@1.0.13
|
||||
underscore@1.0.10
|
||||
url@1.1.0
|
||||
webapp@1.3.15
|
||||
webapp@1.3.17
|
||||
webapp-hashing@1.0.9
|
||||
|
|
|
@ -33,7 +33,7 @@ settings = {"saml":[{
|
|||
"dynamicProfile": true // set to true if we want to create a user in Meteor.users dynamically if SAML assertion is valid
|
||||
"identifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified", // Defaults to urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress
|
||||
"localProfileMatchAttribute": "telephoneNumber" // CAUTION: this will be mapped to profile.<localProfileMatchAttribute> attribute in Mongo if identifierFormat (see above) differs from urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress,
|
||||
"attributesSAML": {[telephoneNumber, sn, givenName, mail]}, // attrs from SAML attr statement, which will be used for local Meteor profile creation
|
||||
"attributesSAML": {[telephoneNumber, sn, givenName, mail]}, // attrs from SAML attr statement, which will be used for local Meteor profile creation. Currently no real attribute mapping. If required use mapping on IdP side.
|
||||
|
||||
}]}
|
||||
|
||||
|
|
|
@ -186,6 +186,24 @@ Accounts.registerLoginHandler(function(loginRequest) {
|
|||
});
|
||||
}
|
||||
|
||||
var attributeNames = Meteor.settings.saml[0].attributesSAML;
|
||||
var meteorProfile = {};
|
||||
if (attributeNames) {
|
||||
attributeNames.forEach(function(attribute) {
|
||||
meteorProfile[attribute] = loginResult.profile[attribute];
|
||||
});
|
||||
}
|
||||
if (Meteor.settings.debug) {
|
||||
console.log("Profile Update for Meteor: " + JSON.stringify(meteorProfile));
|
||||
}
|
||||
Meteor.users.update({
|
||||
_id: user._id
|
||||
}, {
|
||||
$set: {
|
||||
'profile': meteorProfile
|
||||
}
|
||||
});
|
||||
|
||||
//sending token along with the userId
|
||||
var result = {
|
||||
userId: user._id,
|
||||
|
|
Loading…
Reference in a new issue