mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-12-25 06:35:54 -05:00
Fixed SAML issuer problem.
This commit is contained in:
parent
224c99c57a
commit
c988e67104
@ -130,7 +130,7 @@ module.exports.pluginHandler = function (parent) {
|
|||||||
obj.refreshJS = function (req, res) {
|
obj.refreshJS = function (req, res) {
|
||||||
// to minimize server reboots when installing new plugins, we call the new data and overwrite the old pluginHandler on the front end
|
// to minimize server reboots when installing new plugins, we call the new data and overwrite the old pluginHandler on the front end
|
||||||
res.set('Content-Type', 'text/javascript');
|
res.set('Content-Type', 'text/javascript');
|
||||||
res.send('pluginHandlerBuilder = ' + obj.prepExports() + "\r\n" + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");');
|
res.send('pluginHandlerBuilder = ' + obj.prepExports() + '\r\n' + ' pluginHandler = new pluginHandlerBuilder(); pluginHandler.callHook("onWebUIStartupEnd");');
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.callHook = function (hookName, ...args) {
|
obj.callHook = function (hookName, ...args) {
|
||||||
|
@ -4372,7 +4372,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
|
|||||||
function (profile, done) {
|
function (profile, done) {
|
||||||
parent.debug('web', 'SAML profile: ' + JSON.stringify(profile));
|
parent.debug('web', 'SAML profile: ' + JSON.stringify(profile));
|
||||||
if (typeof profile.nameID != 'string') { return done(); }
|
if (typeof profile.nameID != 'string') { return done(); }
|
||||||
var user = { sid: '~' + profile.issuer + ':' + profile.nameID, name: profile.nameID, strategy: 'saml' };
|
var user = { sid: '~saml:' + profile.nameID, name: profile.nameID, strategy: 'saml' };
|
||||||
if ((typeof profile.firstname == 'string') && (typeof profile.lastname == 'string')) { user.name = profile.firstname + ' ' + profile.lastname; }
|
if ((typeof profile.firstname == 'string') && (typeof profile.lastname == 'string')) { user.name = profile.firstname + ' ' + profile.lastname; }
|
||||||
if (typeof profile.email == 'string') { user.email = profile.email; }
|
if (typeof profile.email == 'string') { user.email = profile.email; }
|
||||||
return done(null, user);
|
return done(null, user);
|
||||||
|
Loading…
Reference in New Issue
Block a user