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
  •  | 
  •  

سؤال

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

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top