How to deny the Users at Zonejoin level [Every user is entering into Zone even authentication fails]

StackOverflow https://stackoverflow.com/questions/20833501

  •  22-09-2022
  •  | 
  •  

Question

Recently I am facing a problem that every user (valid/invalid) is joining into the room even I throw the SFSException at ZonejinRequest.. So can anyone explain how to authenticate / stop the invalid users at Zonejoin level with sample snippet. (and also how to remove the joined user from zone if possible)

Thanks in Advance

Was it helpful?

Solution

Hi I got the Bug and it solved, Here my bug is I put the code like this

try {
   if (getApi().checkSecurePassword((ISession)event.getParameter(SFSEventParam.SESSION),plainpwd,pwd)) {
       trace("welcome");
   } else {
       SFSErrorData errData = new SFSErrorData(SFSErrorCode.LOGIN_BAD_PASSWORD);
       errData.addParameter(username);
       throw new SFSLoginException(" Password mismatched ", errData);
   }
}
catch(Exception e){}

so My Exception block it self catching that SFSLoginException.. so I removed outer try/catch now working fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top