public AuthenticationResult Authenticate(IUnsafePacketReader credentialsReader, out IAccountSession session, out Account account) { session = null; account = null; var username = credentialsReader.ReadLengthString(); if (username != "admin") { return AuthenticationResult.NotRegistered; } var password = credentialsReader.ReadLengthString(); if (password != "admin") { return AuthenticationResult.IncorrectPassword; } session = new StubAccountSession(); account = new Account() { AccountId = 1, UserName = "******", Password = "******", Gender = Gender.Male, GameMasterLevel = GameMasterLevel.GameMaster, Status = AccountStatus.Active, AccountPin = "0000", }; return AuthenticationResult.Success; }
public AuthenticationResult Authenticate(IUnsafePacketReader credentialsReader, out IAccountSession session, out Account account) { session = null; account = null; var username = credentialsReader.ReadLengthString(); if (username != "admin") { return(AuthenticationResult.NotRegistered); } var password = credentialsReader.ReadLengthString(); if (password != "admin") { return(AuthenticationResult.IncorrectPassword); } session = new StubAccountSession(); account = new Account() { AccountId = 1, UserName = "******", Password = "******", Gender = Gender.Male, GameMasterLevel = GameMasterLevel.GameMaster, Status = AccountStatus.Active, AccountPin = "0000", }; return(AuthenticationResult.Success); }