public static async void HandleVerifyWebCredentialsRequest(VerifyWebCredentialsRequest verifyWebCredentials, BnetSession session)
{
var logonResult = new LogonResult();
if (verifyWebCredentials.WebCredentials.ToStringUtf8() == session.LoginTicket)
{
logonResult.AccountId = new EntityId
{
High = 0x100000000000000,
Low = session.Account.Id
};
session.Account.GameAccounts.ForEach(ga =>
{
logonResult.GameAccountId.Add(new EntityId
{
// TODO: Build the right High value.
High = 0x200000200576F57,
Low = ga.Id
});
});
logonResult.SessionKey = ByteString.CopyFromUtf8(new byte[0].GenerateRandomKey(64).ToHexString());
}
else
logonResult.ErrorCode = (uint)BnetErrorCode.Denied;
await session.Send(logonResult, BnetServiceHash.AuthenticationListenerService, 5);
}
}