Esempio n. 1
0
        private void MsgRedirectRequest(RedirectRequestPacket packet)
        {
            lock (IncomingClients)
            {
                if (IncomingClients.ContainsKey(packet.Id))
                {
                    IncomingClients.Remove(packet.Id);
                }

                IncomingClients.Add(packet.Id, new LoginAccountEntry(packet));
            }

            AuthCommunicator.Send(new RedirectResponsePacket
            {
                AccountId = packet.Id,
                Response  = RedirectResult.Success
            });
        }
Esempio n. 2
0
        public LoginAccountEntry AuthenticateClient(Client client, uint accountId, uint oneTimeKey)
        {
            lock (IncomingClients)
            {
                if (!IncomingClients.ContainsKey(accountId))
                {
                    return(null);
                }

                var entry = IncomingClients[accountId];
                if (entry == null || entry.OneTimeKey != oneTimeKey)
                {
                    return(null);
                }

                IncomingClients.Remove(accountId);

                return(entry);
            }
        }