Commit 5d1154c5 authored by Dele Olajide's avatar Dele Olajide

Added focus username and password to the admin settings page

Updated Jitsi Videobridge
parent 4b5079da
......@@ -49,6 +49,13 @@
Openfire Meetings Plugin Changelog
</h1>
<p><b>0.1.4</b> -- March 12th, 2015</p>
<ul>
<li>Added focus username and password to the admin settings page</li>
<li>Updated Jitsi Videobridge</li>
</ul>
<p><b>0.1.3</b> -- Feb 28th, 2015</p>
<ul>
......
......@@ -5,7 +5,7 @@
<name>Openfire Meetings</name>
<description>Provides high quality, scalable video conferences using Jitsi Meet and Jitsi Videobridge</description>
<author>Ignite Realtime</author>
<version>0.1.3</version>
<version>0.1.4</version>
<date>02/20/2015</date>
<minServerVersion>3.9.9</minServerVersion>
......
......@@ -70,6 +70,8 @@ config.page.configuration.audiomixer.disabled_description=Audio Mixer disabled
config.page.configuration.record.path=Recording Path
config.page.configuration.record.secret=Recording Password/Secret
config.page.configuration.advanced.features.title=Advanced Features
config.page.configuration.focus.jid=Focus JID
config.page.configuration.focus.password=Focus Password
ofmeet.conference.summary=Below is an overview of meetings.
ofmeet.conference.expired=Conference has been expired.
ofmeet.summary.conferences=Total Conferences
......@@ -82,4 +84,4 @@ ofmeet.summary.dominant.speaker=Speaker
ofmeet.summary.is.expired=Expired?
ofmeet.summary.is.recording=Recording?
ofmeet.summary.no.conferences=No active conferences
ofmeet.summary.expire=Expire
\ No newline at end of file
ofmeet.summary.expire=Expire
......@@ -97,6 +97,8 @@ public final class XMPPServlet extends WebSocketServlet
private boolean doWebSocketConnect(HttpServletRequest request, XMPPWebSocket socket)
{
try {
boolean isExistingSession = false;
String username = URLDecoder.decode( ParamUtils.getParameter(request, "username"), "UTF-8");
String password = URLDecoder.decode( ParamUtils.getParameter(request, "password"), "UTF-8");
String resource = URLDecoder.decode( ParamUtils.getParameter(request, "resource"), "UTF-8");
......@@ -115,6 +117,8 @@ public final class XMPPServlet extends WebSocketServlet
if (session != null)
{
isExistingSession = true;
int conflictLimit = SessionManager.getInstance().getConflictKickLimit();
if (conflictLimit == SessionManager.NEVER_KICK) {
......@@ -158,39 +162,46 @@ public final class XMPPServlet extends WebSocketServlet
} else {
try {
String userName = JID.unescapeNode(username);
UserManager userManager = XMPPServer.getInstance().getUserManager();
if (isExistingSession && (password.equals("dummy") || password.equals("reuse")))
{
authToken = new AuthToken(username);
if (register != null && register.equals("true") && XMPPServer.getInstance().getIQRegisterHandler().isInbandRegEnabled()) // if register, create new user
{
try {
userManager.getUser(userName);
}
catch (UserNotFoundException e) {
userManager.createUser(userName, password, null, null);
}
} else {
} else {
try {
String userName = JID.unescapeNode(username);
UserManager userManager = XMPPServer.getInstance().getUserManager();
try {
userManager.getUser(userName);
}
if (register != null && register.equals("true") && XMPPServer.getInstance().getIQRegisterHandler().isInbandRegEnabled()) // if register, create new user
{
try {
userManager.getUser(userName);
}
catch (UserNotFoundException e) {
userManager.createUser(userName, password, null, null);
}
catch (UserNotFoundException e) {
Log.error( "user not found " + userName, e );
return false;
} else {
try {
userManager.getUser(userName);
}
catch (UserNotFoundException e) {
Log.error( "user not found " + userName, e );
return false;
}
}
}
authToken = AuthFactory.authenticate( userName, password );
authToken = AuthFactory.authenticate( userName, password );
} catch ( UnauthorizedException e ) {
Log.error( "An error occurred while attempting to create a web socket (USERNAME: " + username + " RESOURCE: " + resource + " ) : ", e );
return false;
} catch ( Exception e ) {
Log.error( "An error occurred while attempting to create a web socket : ", e );
return false;
} catch ( UnauthorizedException e ) {
Log.error( "An error occurred while attempting to create a web socket (USERNAME: " + username + " RESOURCE: " + resource + " ) : ", e );
return false;
} catch ( Exception e ) {
Log.error( "An error occurred while attempting to create a web socket : ", e );
return false;
}
}
}
}
......
......@@ -55,7 +55,7 @@ public class JicofoPlugin
if (focusUserPassword != null)
{
Log.info("JicofoPlugin - using focus " + focusUserJid + ":" + hostName + "/" + focusUserPassword);
Log.info("JicofoPlugin - using focus " + focusUserJid + ":" + hostName);
System.setProperty("org.jitsi.videobridge.ofmeet.audio.mixer", JiveGlobals.getProperty("org.jitsi.videobridge.ofmeet.audio.mixer", "false"));
......
......@@ -135,7 +135,13 @@
JiveGlobals.setProperty("org.jitsi.videobridge.ofmeet.adaptive.simulcast", adaptivesimulcast);
String enablesimulcast = request.getParameter("enablesimulcast");
JiveGlobals.setProperty("org.jitsi.videobridge.ofmeet.enable.simulcast", enablesimulcast);
JiveGlobals.setProperty("org.jitsi.videobridge.ofmeet.enable.simulcast", enablesimulcast);
String focusjid = request.getParameter("focusjid");
JiveGlobals.setProperty("org.jitsi.videobridge.ofmeet.focus.user.jid", focusjid);
String focuspassword = request.getParameter("focuspassword");
JiveGlobals.setProperty("org.jitsi.videobridge.ofmeet.focus.user.password", focuspassword);
}
%>
......@@ -298,7 +304,24 @@
<th colspan="2"><fmt:message key="config.page.configuration.security.title"/></th>
</tr>
</thead>
<tbody>
<tbody>
<tr>
<td align="left" width="150">
<fmt:message key="config.page.configuration.focus.jid"/>
</td>
<td><input type="text" size="20" maxlength="100" name="focusjid"
value="<%= JiveGlobals.getProperty("org.jitsi.videobridge.ofmeet.focus.user.jid", "focus@" + XMPPServer.getInstance().getServerInfo().getXMPPDomain()) %>">
</td>
</tr>
<tr>
<td align="left" width="150">
<fmt:message key="config.page.configuration.focus.password"/>
</td>
<td><input type="password" size="20" maxlength="100" name="focuspassword"
value="<%= JiveGlobals.getProperty("org.jitsi.videobridge.ofmeet.focus.user.password", "focus-password-" + System.currentTimeMillis()) %>">
</td>
</tr>
<tr>
<td nowrap colspan="2">
<input type="radio" value="false" name="securityenabled" <%= ("false".equals(JiveGlobals.getProperty("ofmeet.security.enabled", "true")) ? "checked" : "") %>>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment