ep_ldapauth
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -13,5 +13,2 @@ // Copyright 2013 Andrew Grimberg <tykeal@bardicgrove.org> | ||
// ldapauthUsername is set by authenticate and used in messageHandler, keyed on express_sid | ||
var ldapauthUsername = {}; | ||
function ldapauthSetUsername(token, username) { | ||
@@ -56,7 +53,5 @@ console.debug('ep_ldapauth.ldapauthSetUsername: getting authorid for token %s', token); | ||
// User authenticated, save off some information needed for authorization | ||
context.req.session.user = { username: username }; | ||
context.req.session.user = { username: username, displayName: user.cn }; | ||
settings.globalUserName = username; | ||
console.debug('ep_ldapauth.authenticate: deferring setting of username [%s] to CLIENT_READY for express_sid = %s', username, express_sid); | ||
// We use the CN / display name for our global username | ||
ldapauthUsername[express_sid] = user.cn; | ||
return cb([true]); | ||
@@ -128,5 +123,5 @@ }); | ||
var client_id = context.client.id; | ||
var express_sid = context.client.manager.handshaken[client_id].sessionID; | ||
console.debug('ep_ldapauth.handleMessage: intercepted CLIENT_READY message for client_id = %s express_sid = %s, setting username for token %s to %s', client_id, express_sid, context.message.token, ldapauthUsername[express_sid]); | ||
ldapauthSetUsername(context.message.token, ldapauthUsername[express_sid]); | ||
var displayName = context.client.manager.handshaken[client_id].session.user.displayName; | ||
console.debug('ep_ldapauth.handleMessage: intercepted CLIENT_READY message for client_id = %s, setting username for token %s to %s', client_id, context.message.token, displayName); | ||
ldapauthSetUsername(context.message.token, displayName); | ||
} | ||
@@ -133,0 +128,0 @@ } else if ( context.message.type == "COLLABROOM" && context.message.data.type == "USERINFO_UPDATE" ) { |
@@ -5,3 +5,3 @@ { | ||
"author": "Andrew Grimberg <agrimberg@linuxfoundation.org>", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"license": "GPLv2", | ||
@@ -8,0 +8,0 @@ "repository": { |
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
28141
225