Merge pull request #2764 from ritzalam/fix-validate-token
Fix validate token
This commit is contained in:
commit
e7cd030944
@ -87,11 +87,11 @@ trait UsersApp {
|
||||
//send the reply
|
||||
outGW.send(new ValidateAuthTokenReply(mProps.meetingID, msg.userId, msg.token, true, msg.correlationId))
|
||||
|
||||
//join the user
|
||||
handleUserJoin(new UserJoining(mProps.meetingID, msg.userId, msg.token))
|
||||
|
||||
//send the presentation
|
||||
log.info("ValidateToken success: mid=[" + mProps.meetingID + "] uid=[" + msg.userId + "]")
|
||||
|
||||
//join the user
|
||||
this.context.self ! new UserJoining(mProps.meetingID, msg.userId, msg.token)
|
||||
|
||||
}
|
||||
case None => {
|
||||
log.info("ValidateToken failed: mid=[" + mProps.meetingID + "] uid=[" + msg.userId + "]")
|
||||
|
@ -228,6 +228,7 @@ public class UserClientMessageSender {
|
||||
Gson gson = new Gson();
|
||||
message.put("msg", gson.toJson(args));
|
||||
|
||||
log.info("validateAuthTokenReply - " + gson.toJson(args));
|
||||
DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "validateAuthTokenReply", message);
|
||||
service.sendMessage(m);
|
||||
}
|
||||
@ -241,6 +242,7 @@ public class UserClientMessageSender {
|
||||
Gson gson = new Gson();
|
||||
message.put("msg", gson.toJson(args));
|
||||
|
||||
log.info("validateAuthTokenTimedOut - " + gson.toJson(args));
|
||||
DirectClientMessage m = new DirectClientMessage(msg.meetingId, msg.userId, "validateAuthTokenTimedOut", message);
|
||||
service.sendMessage(m);
|
||||
}
|
||||
@ -267,6 +269,8 @@ public class UserClientMessageSender {
|
||||
|
||||
String userId = msg.user.get("userId").toString();
|
||||
|
||||
log.info("joinMeetingReply - " + gson.toJson(args));
|
||||
|
||||
DirectClientMessage jmr = new DirectClientMessage(msg.meetingId, userId, "joinMeetingReply", message);
|
||||
service.sendMessage(jmr);
|
||||
|
||||
|
@ -166,7 +166,10 @@ package org.bigbluebutton.main.model.users
|
||||
LOGGER.debug("*** handleValidateAuthTokenTimedOut. valid=[{0}] **** \n", [tokenValid]);
|
||||
dispatcher.dispatchEvent(new InvalidAuthTokenEvent());
|
||||
}
|
||||
|
||||
if (reconnecting) {
|
||||
onReconnect();
|
||||
reconnecting = false;
|
||||
}
|
||||
}
|
||||
|
||||
private function handleValidateAuthTokenReply(msg: Object):void {
|
||||
@ -182,8 +185,20 @@ package org.bigbluebutton.main.model.users
|
||||
LOGGER.debug("*** handleValidateAuthTokenReply. valid=[{0}] **** \n", [tokenValid]);
|
||||
dispatcher.dispatchEvent(new InvalidAuthTokenEvent());
|
||||
}
|
||||
if (reconnecting) {
|
||||
onReconnect();
|
||||
reconnecting = false;
|
||||
}
|
||||
}
|
||||
|
||||
private function onReconnect():void {
|
||||
if (authenticated) {
|
||||
onReconnectSuccess();
|
||||
} else {
|
||||
onReconnectFailed();
|
||||
}
|
||||
}
|
||||
|
||||
private function onReconnectSuccess():void {
|
||||
var attemptSucceeded:BBBEvent = new BBBEvent(BBBEvent.RECONNECT_CONNECTION_ATTEMPT_SUCCEEDED_EVENT);
|
||||
attemptSucceeded.payload.type = ReconnectionManager.BIGBLUEBUTTON_CONNECTION;
|
||||
@ -293,10 +308,7 @@ package org.bigbluebutton.main.model.users
|
||||
case "NetConnection.Connect.Success":
|
||||
LOGGER.debug("Connection to viewers application succeeded.");
|
||||
JSLog.debug("Successfully connected to BBB App.", logData);
|
||||
if (reconnecting) {
|
||||
reconnecting = false;
|
||||
onReconnectSuccess();
|
||||
}
|
||||
|
||||
validateToken();
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user