Refactoring of BNetServer

This commit is contained in:
hondacrx
2020-07-12 00:06:43 -04:00
parent 4164384b72
commit 581d077acd
318 changed files with 2046 additions and 4694 deletions
@@ -0,0 +1,27 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
namespace Framework.Web
{
[DataContract]
public class LogonData
{
public string this[string inputId] => Inputs.SingleOrDefault(i => i.Id == inputId)?.Value;
[DataMember(Name = "version")]
public string Version { get; set; }
[DataMember(Name = "program_id")]
public string Program { get; set; }
[DataMember(Name = "platform_id")]
public string Platform { get; set; }
[DataMember(Name = "inputs")]
public List<FormInputValue> Inputs { get; set; } = new List<FormInputValue>();
}
}
@@ -0,0 +1,38 @@
// Copyright (c) CypherCore <http://github.com/CypherCore> All rights reserved.
// Licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE file in the project root for full license information.
using System.Runtime.Serialization;
namespace Framework.Web
{
[DataContract]
public class LogonResult
{
[DataMember(Name = "authentication_state")]
public string AuthenticationState { get; set; }
[DataMember(Name = "login_ticket")]
public string LoginTicket { get; set; }
[DataMember(Name = "error_code")]
public string ErrorCode { get; set; }
[DataMember(Name = "error_message")]
public string ErrorMessage { get; set; }
[DataMember(Name = "support_error_code")]
public string SupportErrorCode { get; set; }
[DataMember(Name = "authenticator_form")]
public FormInputs AuthenticatorForm { get; set; } = new FormInputs();
}
public enum AuthenticationState
{
NONE = 0,
LOGIN = 1,
LEGAL = 2,
AUTHENTICATOR = 3,
DONE = 4,
}
}