return;
end
- -- Store the original host (this is used for config, etc.)
- session.user = attr.to;
- -- Set the host for future reference
- session.host = config.get(attr.to, "core", "component_address") or attr.to;
-- Note that we don't create the internal component
-- until after the external component auths successfully
+ session.host = attr.to;
session.streamid = uuid_gen();
session.notopen = nil;
return;
end
- local secret = config.get(session.user, "core", "component_secret");
+ local secret = config.get(session.host, "core", "component_secret");
if not secret then
- (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.user);
+ (session.log or log)("warn", "Component attempted to identify as %s, but component_secret is not set", session.host);
session:close("not-authorized");
return;
end