Ejemplo n.º 1
0
 private static void LogonRequestCallback(Client pClient, Header pHeader, LogonRequest pLogonRequest)
 {
     Account account = AccountCache.RetrieveAccountByEmail(pLogonRequest.Email);
     if (account == null)
     {
         pClient.PermittedServices.Clear();
         pClient.ImportedServices.Clear();
         pClient.SendAuthenticationClientLogonComplete(new LogonResult(EErrorCode.LoginInformationWasIncorrect));
         return;
     }
 }
Ejemplo n.º 2
0
 public static void OnLogonRequest(Client pClient, Header pHeader, MemoryStream pData)
 {
     LogonRequest logonRequest = new LogonRequest();
     if (!logonRequest.Read(pData) || !logonRequest.HasEmail) return;
     Program.AddCallback(() => LogonRequestCallback(pClient, pHeader, logonRequest));
 }