Convert to new namespace stuff and implicit usings
This commit is contained in:
@@ -3,10 +3,10 @@ using System.Runtime.InteropServices;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Prospect.Launcher.Invoke;
|
using Prospect.Launcher.Invoke;
|
||||||
|
|
||||||
namespace Prospect.Launcher
|
namespace Prospect.Launcher;
|
||||||
|
|
||||||
|
public static class Inject
|
||||||
{
|
{
|
||||||
public static class Inject
|
|
||||||
{
|
|
||||||
const int PROCESS_CREATE_THREAD = 0x0002;
|
const int PROCESS_CREATE_THREAD = 0x0002;
|
||||||
const int PROCESS_QUERY_INFORMATION = 0x0400;
|
const int PROCESS_QUERY_INFORMATION = 0x0400;
|
||||||
const int PROCESS_VM_OPERATION = 0x0008;
|
const int PROCESS_VM_OPERATION = 0x0008;
|
||||||
@@ -52,5 +52,4 @@ namespace Prospect.Launcher
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using Prospect.Launcher.Invoke.Structs;
|
using Prospect.Launcher.Invoke.Structs;
|
||||||
|
|
||||||
namespace Prospect.Launcher.Invoke
|
namespace Prospect.Launcher.Invoke;
|
||||||
|
|
||||||
|
internal static class Kernel32
|
||||||
{
|
{
|
||||||
internal static class Kernel32
|
|
||||||
{
|
|
||||||
[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Auto)]
|
[DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Auto)]
|
||||||
public static extern bool CreateProcess(string lpApplicationName,
|
public static extern bool CreateProcess(string lpApplicationName,
|
||||||
string lpCommandLine, IntPtr lpProcessAttributes,
|
string lpCommandLine, IntPtr lpProcessAttributes,
|
||||||
@@ -49,5 +49,4 @@ namespace Prospect.Launcher.Invoke
|
|||||||
|
|
||||||
[DllImport("kernel32.dll", SetLastError = true)]
|
[DllImport("kernel32.dll", SetLastError = true)]
|
||||||
public static extern uint ResumeThread(IntPtr hThread);
|
public static extern uint ResumeThread(IntPtr hThread);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Prospect.Launcher.Invoke.Structs
|
namespace Prospect.Launcher.Invoke.Structs;
|
||||||
|
|
||||||
|
[Flags]
|
||||||
|
internal enum ProcessCreationFlags : uint
|
||||||
{
|
{
|
||||||
[Flags]
|
|
||||||
internal enum ProcessCreationFlags : uint
|
|
||||||
{
|
|
||||||
ZERO_FLAG = 0x00000000,
|
ZERO_FLAG = 0x00000000,
|
||||||
CREATE_BREAKAWAY_FROM_JOB = 0x01000000,
|
CREATE_BREAKAWAY_FROM_JOB = 0x01000000,
|
||||||
CREATE_DEFAULT_ERROR_MODE = 0x04000000,
|
CREATE_DEFAULT_ERROR_MODE = 0x04000000,
|
||||||
@@ -22,5 +22,4 @@ namespace Prospect.Launcher.Invoke.Structs
|
|||||||
DETACHED_PROCESS = 0x00000008,
|
DETACHED_PROCESS = 0x00000008,
|
||||||
EXTENDED_STARTUPINFO_PRESENT = 0x00080000,
|
EXTENDED_STARTUPINFO_PRESENT = 0x00080000,
|
||||||
INHERIT_PARENT_AFFINITY = 0x00010000
|
INHERIT_PARENT_AFFINITY = 0x00010000
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Prospect.Launcher.Invoke.Structs
|
namespace Prospect.Launcher.Invoke.Structs;
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct ProcessInformation
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
internal struct ProcessInformation
|
|
||||||
{
|
|
||||||
public IntPtr hProcess;
|
public IntPtr hProcess;
|
||||||
public IntPtr hThread;
|
public IntPtr hThread;
|
||||||
public uint dwProcessId;
|
public uint dwProcessId;
|
||||||
public uint dwThreadId;
|
public uint dwThreadId;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Prospect.Launcher.Invoke.Structs
|
namespace Prospect.Launcher.Invoke.Structs;
|
||||||
|
|
||||||
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
|
internal struct StartupInfo
|
||||||
{
|
{
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
internal struct StartupInfo
|
|
||||||
{
|
|
||||||
public uint cb;
|
public uint cb;
|
||||||
public string lpReserved;
|
public string lpReserved;
|
||||||
public string lpDesktop;
|
public string lpDesktop;
|
||||||
@@ -24,5 +24,4 @@ namespace Prospect.Launcher.Invoke.Structs
|
|||||||
public IntPtr hStdInput;
|
public IntPtr hStdInput;
|
||||||
public IntPtr hStdOutput;
|
public IntPtr hStdOutput;
|
||||||
public IntPtr hStdError;
|
public IntPtr hStdError;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -4,10 +4,10 @@ using System.IO;
|
|||||||
using Prospect.Launcher.Invoke;
|
using Prospect.Launcher.Invoke;
|
||||||
using Prospect.Launcher.Invoke.Structs;
|
using Prospect.Launcher.Invoke.Structs;
|
||||||
|
|
||||||
namespace Prospect.Launcher
|
namespace Prospect.Launcher;
|
||||||
|
|
||||||
|
internal static class Program
|
||||||
{
|
{
|
||||||
internal static class Program
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Steam AppId.
|
/// Steam AppId.
|
||||||
/// - https://steamdb.info/app/480/
|
/// - https://steamdb.info/app/480/
|
||||||
@@ -74,5 +74,4 @@ namespace Prospect.Launcher
|
|||||||
|
|
||||||
Console.WriteLine("Resumed.");
|
Console.WriteLine("Resumed.");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace Prospect.Server.Api.Config
|
namespace Prospect.Server.Api.Config;
|
||||||
|
|
||||||
|
public class DatabaseSettings
|
||||||
{
|
{
|
||||||
public class DatabaseSettings
|
|
||||||
{
|
|
||||||
public string ConnectionString { get; set; }
|
public string ConnectionString { get; set; }
|
||||||
public string DatabaseName { get; set; }
|
public string DatabaseName { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace Prospect.Server.Api.Config
|
namespace Prospect.Server.Api.Config;
|
||||||
|
|
||||||
|
public class PlayFabSettings
|
||||||
{
|
{
|
||||||
public class PlayFabSettings
|
|
||||||
{
|
|
||||||
public string PublisherId { get; set; }
|
public string PublisherId { get; set; }
|
||||||
public string TitleId { get; set; }
|
public string TitleId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
@@ -15,12 +12,15 @@ using Prospect.Server.Api.Services.Database.Models;
|
|||||||
using Prospect.Server.Api.Services.UserData;
|
using Prospect.Server.Api.Services.UserData;
|
||||||
using Prospect.Server.Steam;
|
using Prospect.Server.Steam;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Controllers
|
namespace Prospect.Server.Api.Controllers;
|
||||||
|
|
||||||
|
[ApiController]
|
||||||
|
[Route("Client")]
|
||||||
|
public class ClientController : Controller
|
||||||
{
|
{
|
||||||
[ApiController]
|
private const int AppIdDefault = 480;
|
||||||
[Route("Client")]
|
private const int AppIdCycleBeta = 1600361;
|
||||||
public class ClientController : Controller
|
|
||||||
{
|
|
||||||
private readonly PlayFabSettings _settings;
|
private readonly PlayFabSettings _settings;
|
||||||
private readonly AuthTokenService _authTokenService;
|
private readonly AuthTokenService _authTokenService;
|
||||||
private readonly DbUserService _userService;
|
private readonly DbUserService _userService;
|
||||||
@@ -51,7 +51,7 @@ namespace Prospect.Server.Api.Controllers
|
|||||||
if (!string.IsNullOrEmpty(request.SteamTicket))
|
if (!string.IsNullOrEmpty(request.SteamTicket))
|
||||||
{
|
{
|
||||||
var ticket = AppTicket.Parse(request.SteamTicket);
|
var ticket = AppTicket.Parse(request.SteamTicket);
|
||||||
if (ticket.IsValid && ticket.HasValidSignature)
|
if (ticket.IsValid && ticket.HasValidSignature && (ticket.AppId == AppIdDefault || ticket.AppId == AppIdCycleBeta))
|
||||||
{
|
{
|
||||||
var userSteamId = ticket.SteamId.ToString();
|
var userSteamId = ticket.SteamId.ToString();
|
||||||
|
|
||||||
@@ -133,7 +133,7 @@ namespace Prospect.Server.Api.Controllers
|
|||||||
{
|
{
|
||||||
Code = 200,
|
Code = 200,
|
||||||
Status = "OK",
|
Status = "OK",
|
||||||
Data = new object()
|
Data = new {}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,5 +266,4 @@ namespace Prospect.Server.Api.Controllers
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,18 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using System.Collections.Generic;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Prospect.Server.Api.Models.Client;
|
using Prospect.Server.Api.Models.Client;
|
||||||
using Prospect.Server.Api.Models.CloudScript;
|
using Prospect.Server.Api.Models.CloudScript;
|
||||||
using Prospect.Server.Api.Models.CloudScript.Data;
|
using Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
using Prospect.Server.Api.Services.Auth.Entity;
|
using Prospect.Server.Api.Services.Auth.Entity;
|
||||||
using Prospect.Server.Api.Services.Auth.Extensions;
|
using Prospect.Server.Api.Services.Auth.Extensions;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Controllers
|
namespace Prospect.Server.Api.Controllers;
|
||||||
|
|
||||||
|
[Route("CloudScript")]
|
||||||
|
[ApiController]
|
||||||
|
[Authorize(AuthenticationSchemes = EntityAuthenticationOptions.DefaultScheme)]
|
||||||
|
public class CloudScriptController : Controller
|
||||||
{
|
{
|
||||||
[Route("CloudScript")]
|
|
||||||
[ApiController]
|
|
||||||
[Authorize(AuthenticationSchemes = EntityAuthenticationOptions.DefaultScheme)]
|
|
||||||
public class CloudScriptController : Controller
|
|
||||||
{
|
|
||||||
private readonly ILogger<CloudScriptController> _logger;
|
private readonly ILogger<CloudScriptController> _logger;
|
||||||
|
|
||||||
public CloudScriptController(ILogger<CloudScriptController> logger)
|
public CloudScriptController(ILogger<CloudScriptController> logger)
|
||||||
@@ -302,5 +299,4 @@ namespace Prospect.Server.Api.Controllers
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,14 @@
|
|||||||
using System;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Converters
|
namespace Prospect.Server.Api.Converters;
|
||||||
|
|
||||||
|
// By default System.Text.Json outputs and we want:
|
||||||
|
// Output: 2021-11-04T04:58:20.4232184Z
|
||||||
|
// Want : 2021-10-24T02:54:56.652Z
|
||||||
|
public class DateTimeConverter : JsonConverter<DateTime>
|
||||||
{
|
{
|
||||||
// By default System.Text.Json outputs and we want:
|
|
||||||
// Output: 2021-11-04T04:58:20.4232184Z
|
|
||||||
// Want : 2021-10-24T02:54:56.652Z
|
|
||||||
public class DateTimeConverter : JsonConverter<DateTime>
|
|
||||||
{
|
|
||||||
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||||
{
|
{
|
||||||
Debug.Assert(typeToConvert == typeof(DateTime));
|
Debug.Assert(typeToConvert == typeof(DateTime));
|
||||||
@@ -20,5 +19,4 @@ namespace Prospect.Server.Api.Converters
|
|||||||
{
|
{
|
||||||
writer.WriteStringValue(value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK"));
|
writer.WriteStringValue(value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK"));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System.Runtime.Serialization;
|
||||||
using System.Runtime.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Exceptions
|
namespace Prospect.Server.Api.Exceptions;
|
||||||
|
|
||||||
|
public class ProspectException : Exception
|
||||||
{
|
{
|
||||||
public class ProspectException : Exception
|
|
||||||
{
|
|
||||||
public ProspectException()
|
public ProspectException()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -20,5 +19,4 @@ namespace Prospect.Server.Api.Exceptions
|
|||||||
public ProspectException(string message, Exception innerException) : base(message, innerException)
|
public ProspectException(string message, Exception innerException) : base(message, innerException)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,11 @@
|
|||||||
using System.IO;
|
using System.Text;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.AspNetCore.Http.Extensions;
|
using Microsoft.AspNetCore.Http.Extensions;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Middleware
|
namespace Prospect.Server.Api.Middleware;
|
||||||
|
|
||||||
|
public class RequestLoggerMiddleware
|
||||||
{
|
{
|
||||||
public class RequestLoggerMiddleware
|
|
||||||
{
|
|
||||||
private readonly ILogger<RequestLoggerMiddleware> _logger;
|
private readonly ILogger<RequestLoggerMiddleware> _logger;
|
||||||
private readonly RequestDelegate _next;
|
private readonly RequestDelegate _next;
|
||||||
|
|
||||||
@@ -60,5 +56,4 @@ namespace Prospect.Server.Api.Middleware
|
|||||||
request.Body.Position = 0;
|
request.Body.Position = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class ClientLoginWithSteamRequest
|
||||||
{
|
{
|
||||||
public class ClientLoginWithSteamRequest
|
|
||||||
{
|
|
||||||
[JsonPropertyName("CreateAccount")]
|
[JsonPropertyName("CreateAccount")]
|
||||||
public bool CreateAccount { get; set; }
|
public bool CreateAccount { get; set; }
|
||||||
|
|
||||||
@@ -22,10 +22,10 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
|
|
||||||
[JsonPropertyName("SteamTicket")]
|
[JsonPropertyName("SteamTicket")]
|
||||||
public string SteamTicket { get; set; }
|
public string SteamTicket { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class InfoParameters
|
public class InfoParameters
|
||||||
{
|
{
|
||||||
[JsonPropertyName("GetCharacterInventories")]
|
[JsonPropertyName("GetCharacterInventories")]
|
||||||
public bool GetCharacterInventories { get; set; }
|
public bool GetCharacterInventories { get; set; }
|
||||||
|
|
||||||
@@ -55,5 +55,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
|
|
||||||
[JsonPropertyName("GetUserVirtualCurrency")]
|
[JsonPropertyName("GetUserVirtualCurrency")]
|
||||||
public bool GetUserVirtualCurrency { get; set; }
|
public bool GetUserVirtualCurrency { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class ClientResponse
|
||||||
{
|
{
|
||||||
public class ClientResponse
|
|
||||||
{
|
|
||||||
[JsonPropertyName("code")]
|
[JsonPropertyName("code")]
|
||||||
public int Code { get; set; }
|
public int Code { get; set; }
|
||||||
|
|
||||||
@@ -21,12 +21,11 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("errorMessage")]
|
[JsonPropertyName("errorMessage")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ClientResponse<T> : ClientResponse
|
public class ClientResponse<T> : ClientResponse
|
||||||
{
|
{
|
||||||
[JsonPropertyName("data")]
|
[JsonPropertyName("data")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public T Data { get; set; }
|
public T Data { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public enum CloudScriptRevisionOption
|
||||||
{
|
{
|
||||||
public enum CloudScriptRevisionOption
|
|
||||||
{
|
|
||||||
Live,
|
Live,
|
||||||
Latest,
|
Latest,
|
||||||
Specific
|
Specific
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FEntityKey
|
||||||
{
|
{
|
||||||
public class FEntityKey
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Unique ID of the entity.
|
/// Unique ID of the entity.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -19,5 +19,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
// Not in PlayFab SDK
|
// Not in PlayFab SDK
|
||||||
[JsonPropertyName("TypeString")]
|
[JsonPropertyName("TypeString")]
|
||||||
public string TypeString { get; set; }
|
public string TypeString { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FEntityTokenResponse
|
||||||
{
|
{
|
||||||
public class FEntityTokenResponse
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The entity id and type.
|
/// [optional] The entity id and type.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -25,5 +24,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("TokenExpiration")]
|
[JsonPropertyName("TokenExpiration")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public DateTime? TokenExpiration { get; set; }
|
public DateTime? TokenExpiration { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FFunctionExecutionError
|
||||||
{
|
{
|
||||||
public class FFunctionExecutionError
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Error code, such as CloudScriptAzureFunctionsExecutionTimeLimitExceeded, CloudScriptAzureFunctionsArgumentSizeExceeded,
|
/// [optional] Error code, such as CloudScriptAzureFunctionsExecutionTimeLimitExceeded, CloudScriptAzureFunctionsArgumentSizeExceeded,
|
||||||
/// CloudScriptAzureFunctionsReturnSizeExceeded or CloudScriptAzureFunctionsHTTPRequestError
|
/// CloudScriptAzureFunctionsReturnSizeExceeded or CloudScriptAzureFunctionsHTTPRequestError
|
||||||
@@ -25,5 +25,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("StackTrace")]
|
[JsonPropertyName("StackTrace")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string StackTrace { get; set; }
|
public string StackTrace { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FGenericServiceId
|
||||||
{
|
{
|
||||||
public class FGenericServiceId
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of the service for which the player has a unique identifier.
|
/// Name of the service for which the player has a unique identifier.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -15,5 +15,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("UserId")]
|
[JsonPropertyName("UserId")]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FGetPlayerCombinedInfoResultPayload
|
||||||
{
|
{
|
||||||
public class FGetPlayerCombinedInfoResultPayload
|
|
||||||
{
|
|
||||||
// TSharedPtr<FUserAccountInfo> AccountInfo;
|
// TSharedPtr<FUserAccountInfo> AccountInfo;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -56,5 +55,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
// TMap<FString, int32> UserVirtualCurrency;
|
// TMap<FString, int32> UserVirtualCurrency;
|
||||||
|
|
||||||
// TMap<FString, FVirtualCurrencyRechargeTime> UserVirtualCurrencyRechargeTimes;
|
// TMap<FString, FVirtualCurrencyRechargeTime> UserVirtualCurrencyRechargeTimes;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,9 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FItemInstance
|
||||||
{
|
{
|
||||||
public class FItemInstance
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Game specific comment associated with this instance when it was added to the user inventory.
|
/// [optional] Game specific comment associated with this instance when it was added to the user inventory.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -112,5 +110,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("UsesIncrementedBy")]
|
[JsonPropertyName("UsesIncrementedBy")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public int? UsesIncrementedBy { get; set; }
|
public int? UsesIncrementedBy { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FLogStatement
|
||||||
{
|
{
|
||||||
public class FLogStatement
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Optional object accompanying the message as contextual information
|
/// [optional] Optional object accompanying the message as contextual information
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -24,5 +24,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("Message")]
|
[JsonPropertyName("Message")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FPlayerProfileModel
|
||||||
{
|
{
|
||||||
public class FPlayerProfileModel
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Player display name
|
/// [optional] Player display name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -31,5 +31,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("TitleId")]
|
[JsonPropertyName("TitleId")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string TitleId { get; set; }
|
public string TitleId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FScriptExecutionError
|
||||||
{
|
{
|
||||||
public class FScriptExecutionError
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded,
|
/// [optional] Error code, such as CloudScriptNotFound, JavascriptException, CloudScriptFunctionArgumentSizeExceeded,
|
||||||
/// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError
|
/// CloudScriptAPIRequestCountExceeded, CloudScriptAPIRequestError, or CloudScriptHTTPRequestError
|
||||||
@@ -25,5 +25,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("StackTrace")]
|
[JsonPropertyName("StackTrace")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string StackTrace { get; set; }
|
public string StackTrace { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FTreatmentAssignment
|
||||||
{
|
{
|
||||||
public class FTreatmentAssignment
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] List of the experiment variables.
|
/// [optional] List of the experiment variables.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -18,5 +17,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("Variants")]
|
[JsonPropertyName("Variants")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public List<string> Variants { get; set; }
|
public List<string> Variants { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FUserDataRecord
|
||||||
{
|
{
|
||||||
public class FUserDataRecord
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timestamp for when this data was last updated.
|
/// Timestamp for when this data was last updated.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -25,5 +24,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("Value")]
|
[JsonPropertyName("Value")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FUserSettings
|
||||||
{
|
{
|
||||||
public class FUserSettings
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Boolean for whether this player is eligible for gathering device info.
|
/// Boolean for whether this player is eligible for gathering device info.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -21,5 +21,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("NeedsAttribution")]
|
[JsonPropertyName("NeedsAttribution")]
|
||||||
public bool NeedsAttribution { get; set; }
|
public bool NeedsAttribution { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FVariable
|
||||||
{
|
{
|
||||||
public class FVariable
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of the variable.
|
/// Name of the variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -16,5 +16,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
[JsonPropertyName("Value")]
|
[JsonPropertyName("Value")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public class FVirtualCurrencyRechargeTime
|
||||||
{
|
{
|
||||||
public class FVirtualCurrencyRechargeTime
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value
|
/// Maximum value to which the regenerating currency will automatically increment. Note that it can exceed this value
|
||||||
/// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen
|
/// through use of the AddUserVirtualCurrency API call. However, it will not regenerate automatically until it has fallen
|
||||||
@@ -24,5 +23,4 @@ namespace Prospect.Server.Api.Models.Client.Data
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("SecondsToRecharge")]
|
[JsonPropertyName("SecondsToRecharge")]
|
||||||
public int SecondsToRecharge { get; set; }
|
public int SecondsToRecharge { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace Prospect.Server.Api.Models.Client.Data
|
namespace Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
|
public enum UserDataPermission
|
||||||
{
|
{
|
||||||
public enum UserDataPermission
|
|
||||||
{
|
|
||||||
Public,
|
Public,
|
||||||
Private
|
Private
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FAddGenericIDRequest
|
||||||
{
|
{
|
||||||
public class FAddGenericIDRequest
|
|
||||||
{
|
|
||||||
[JsonPropertyName("GenericId")]
|
[JsonPropertyName("GenericId")]
|
||||||
public FGenericServiceId GenericId { get; set; }
|
public FGenericServiceId GenericId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FExecuteCloudScriptResult
|
||||||
{
|
{
|
||||||
public class FExecuteCloudScriptResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of PlayFab API requests issued by the CloudScript function
|
/// Number of PlayFab API requests issued by the CloudScript function
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -81,5 +80,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("Revision")]
|
[JsonPropertyName("Revision")]
|
||||||
public int Revision { get; set; }
|
public int Revision { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FExecuteCloudScriptServerRequest
|
||||||
{
|
{
|
||||||
public class FExecuteCloudScriptServerRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -56,5 +55,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("SpecificRevision")]
|
[JsonPropertyName("SpecificRevision")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public int? SpecificRevision { get; set; }
|
public int? SpecificRevision { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FExecuteFunctionRequest
|
||||||
{
|
{
|
||||||
public class FExecuteFunctionRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -40,5 +39,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("GeneratePlayStreamEvent")]
|
[JsonPropertyName("GeneratePlayStreamEvent")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public bool? GeneratePlayStreamEvent { get; set; }
|
public bool? GeneratePlayStreamEvent { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FExecuteFunctionResult
|
||||||
{
|
{
|
||||||
public class FExecuteFunctionResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Error from the CloudScript Azure Function.
|
/// [optional] Error from the CloudScript Azure Function.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -37,5 +37,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("FunctionResultTooLarge")]
|
[JsonPropertyName("FunctionResultTooLarge")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public bool? FunctionResultTooLarge { get; set; }
|
public bool? FunctionResultTooLarge { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetTitleDataRequest
|
||||||
{
|
{
|
||||||
public class FGetTitleDataRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Specific keys to search for in the title data (leave null to get all keys)
|
/// [optional] Specific keys to search for in the title data (leave null to get all keys)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -17,5 +16,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("OverrideLabel")]
|
[JsonPropertyName("OverrideLabel")]
|
||||||
public string OverrideLabel { get; set; }
|
public string OverrideLabel { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetTitleDataResult
|
||||||
{
|
{
|
||||||
public class FGetTitleDataResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] a dictionary object of key / value pairs
|
/// [optional] a dictionary object of key / value pairs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("Data")]
|
[JsonPropertyName("Data")]
|
||||||
public Dictionary<string, string> Data { get; set; }
|
public Dictionary<string, string> Data { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetUserDataRequest
|
||||||
{
|
{
|
||||||
public class FGetUserDataRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The version that currently exists according to the caller. The call will return the data for all of the keys if the
|
/// [optional] The version that currently exists according to the caller. The call will return the data for all of the keys if the
|
||||||
/// version in the system is greater than this.
|
/// version in the system is greater than this.
|
||||||
@@ -24,5 +23,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("PlayFabId")]
|
[JsonPropertyName("PlayFabId")]
|
||||||
public string PlayFabId { get; set; }
|
public string PlayFabId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetUserDataResult
|
||||||
{
|
{
|
||||||
public class FGetUserDataResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] User specific data for this title.
|
/// [optional] User specific data for this title.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -18,5 +17,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("DataVersion")]
|
[JsonPropertyName("DataVersion")]
|
||||||
public uint DataVersion { get; set; }
|
public uint DataVersion { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetUserInventoryRequest
|
||||||
{
|
{
|
||||||
public class FGetUserInventoryRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("CustomTags")]
|
[JsonPropertyName("CustomTags")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public Dictionary<string, string> CustomTags { get; set; }
|
public Dictionary<string, string> CustomTags { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FGetUserInventoryResult
|
||||||
{
|
{
|
||||||
public class FGetUserInventoryResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Array of inventory items belonging to the user.
|
/// [optional] Array of inventory items belonging to the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -26,5 +25,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("VirtualCurrencyRechargeTimes")]
|
[JsonPropertyName("VirtualCurrencyRechargeTimes")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public Dictionary<string, FVirtualCurrencyRechargeTime> VirtualCurrencyRechargeTimes { get; set; }
|
public Dictionary<string, FVirtualCurrencyRechargeTime> VirtualCurrencyRechargeTimes { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FServerLoginResult
|
||||||
{
|
{
|
||||||
public class FServerLoginResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and
|
/// [optional] If LoginTitlePlayerAccountEntity flag is set on the login request the title_player_account will also be logged in and
|
||||||
/// returned.
|
/// returned.
|
||||||
@@ -60,5 +59,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
[JsonPropertyName("TreatmentAssignment")]
|
[JsonPropertyName("TreatmentAssignment")]
|
||||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
|
||||||
public FTreatmentAssignment TreatmentAssignment { get; set; }
|
public FTreatmentAssignment TreatmentAssignment { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FUpdateUserDataRequest
|
||||||
{
|
{
|
||||||
public class FUpdateUserDataRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -34,5 +33,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
|
/// Unique PlayFab assigned ID of the user on whom the operation will be performed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string PlayFabId { get; set; }
|
public string PlayFabId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FUpdateUserDataResult
|
||||||
{
|
{
|
||||||
public class FUpdateUserDataResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates the current version of the data that has been set. This is incremented with every set call for that type of
|
/// Indicates the current version of the data that has been set. This is incremented with every set call for that type of
|
||||||
/// data (read-only, internal, etc). This version can be provided in Get calls to find updated data.
|
/// data (read-only, internal, etc). This version can be provided in Get calls to find updated data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint DataVersion { get; set; }
|
public uint DataVersion { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FUpdateUserTitleDisplayNameRequest
|
||||||
{
|
{
|
||||||
public class FUpdateUserTitleDisplayNameRequest
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
/// [optional] The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -17,5 +16,4 @@ namespace Prospect.Server.Api.Models.Client
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonPropertyName("DisplayName")]
|
[JsonPropertyName("DisplayName")]
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
namespace Prospect.Server.Api.Models.Client
|
namespace Prospect.Server.Api.Models.Client;
|
||||||
|
|
||||||
|
public class FUpdateUserTitleDisplayNameResult
|
||||||
{
|
{
|
||||||
public class FUpdateUserTitleDisplayNameResult
|
|
||||||
{
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// [optional] Current title display name for the user (this will be the original display name if the rename attempt failed).
|
/// [optional] Current title display name for the user (this will be the original display name if the rename attempt failed).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DisplayName { get; set; }
|
public string DisplayName { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYActiveContractPlayerData
|
||||||
{
|
{
|
||||||
public class FYActiveContractPlayerData
|
|
||||||
{
|
|
||||||
[JsonPropertyName("contractId")]
|
[JsonPropertyName("contractId")]
|
||||||
public string ContractId { get; set; }
|
public string ContractId { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("progress")]
|
[JsonPropertyName("progress")]
|
||||||
public List<int> Progress { get; set; }
|
public List<int> Progress { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYFactionContractData
|
||||||
{
|
{
|
||||||
public class FYFactionContractData
|
|
||||||
{
|
|
||||||
[JsonPropertyName("contractId")]
|
[JsonPropertyName("contractId")]
|
||||||
public string ContractId { get; set; }
|
public string ContractId { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("contractIsLockedDueToLowFactionReputation")]
|
[JsonPropertyName("contractIsLockedDueToLowFactionReputation")]
|
||||||
public bool ContractIsLockedDueToLowFactionReputation { get; set; }
|
public bool ContractIsLockedDueToLowFactionReputation { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYFactionContractsData
|
||||||
{
|
{
|
||||||
public class FYFactionContractsData
|
|
||||||
{
|
|
||||||
[JsonPropertyName("factionId")]
|
[JsonPropertyName("factionId")]
|
||||||
public string FactionId { get; set; }
|
public string FactionId { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("contracts")]
|
[JsonPropertyName("contracts")]
|
||||||
public List<FYFactionContractData> Contracts { get; set; }
|
public List<FYFactionContractData> Contracts { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYFactionsContractsData
|
||||||
{
|
{
|
||||||
public class FYFactionsContractsData
|
|
||||||
{
|
|
||||||
[JsonPropertyName("boards")]
|
[JsonPropertyName("boards")]
|
||||||
public List<FYFactionContractsData> Boards { get; set; }
|
public List<FYFactionContractsData> Boards { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("lastBoardRefreshTimeUtc")]
|
[JsonPropertyName("lastBoardRefreshTimeUtc")]
|
||||||
public FYTimestamp LastBoardRefreshTimeUtc { get; set; }
|
public FYTimestamp LastBoardRefreshTimeUtc { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYItemCurrentlyBeingCrafted
|
||||||
{
|
{
|
||||||
public class FYItemCurrentlyBeingCrafted
|
|
||||||
{
|
|
||||||
[JsonPropertyName("itemId")]
|
[JsonPropertyName("itemId")]
|
||||||
public string ItemId { get; set; }
|
public string ItemId { get; set; }
|
||||||
|
|
||||||
@@ -15,5 +15,4 @@ namespace Prospect.Server.Api.Models.CloudScript.Data
|
|||||||
|
|
||||||
[JsonPropertyName("utcTimestampWhenCraftingStarted")]
|
[JsonPropertyName("utcTimestampWhenCraftingStarted")]
|
||||||
public FYTimestamp UtcTimestampWhenCraftingStarted { get; set; }
|
public FYTimestamp UtcTimestampWhenCraftingStarted { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,9 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript.Data
|
namespace Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
|
public class FYTimestamp
|
||||||
{
|
{
|
||||||
public class FYTimestamp
|
|
||||||
{
|
|
||||||
[JsonPropertyName("seconds")]
|
[JsonPropertyName("seconds")]
|
||||||
public int Seconds { get; set; }
|
public int Seconds { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using Prospect.Server.Api.Models.CloudScript.Data;
|
using Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript
|
namespace Prospect.Server.Api.Models.CloudScript;
|
||||||
|
|
||||||
|
public class FYGetCraftingInProgressDataResult
|
||||||
{
|
{
|
||||||
public class FYGetCraftingInProgressDataResult
|
|
||||||
{
|
|
||||||
[JsonPropertyName("userId")]
|
[JsonPropertyName("userId")]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
|
|
||||||
@@ -13,5 +13,4 @@ namespace Prospect.Server.Api.Models.CloudScript
|
|||||||
|
|
||||||
[JsonPropertyName("itemCurrentlyBeingCrafted")]
|
[JsonPropertyName("itemCurrentlyBeingCrafted")]
|
||||||
public FYItemCurrentlyBeingCrafted ItemCurrentlyBeingCrafted { get; set; }
|
public FYItemCurrentlyBeingCrafted ItemCurrentlyBeingCrafted { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Text.Json.Serialization;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
using Prospect.Server.Api.Models.CloudScript.Data;
|
using Prospect.Server.Api.Models.CloudScript.Data;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Models.CloudScript
|
namespace Prospect.Server.Api.Models.CloudScript;
|
||||||
|
|
||||||
|
public class FYGetPlayerContractsResult
|
||||||
{
|
{
|
||||||
public class FYGetPlayerContractsResult
|
|
||||||
{
|
|
||||||
[JsonPropertyName("userId")]
|
[JsonPropertyName("userId")]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
|
|
||||||
@@ -20,5 +19,4 @@ namespace Prospect.Server.Api.Models.CloudScript
|
|||||||
|
|
||||||
[JsonPropertyName("refreshHours24UtcFromBackend")]
|
[JsonPropertyName("refreshHours24UtcFromBackend")]
|
||||||
public int RefreshHours24UtcFromBackend { get; set; }
|
public int RefreshHours24UtcFromBackend { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,10 @@
|
|||||||
using System;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Serilog.Events;
|
using Serilog.Events;
|
||||||
|
|
||||||
namespace Prospect.Server.Api
|
namespace Prospect.Server.Api;
|
||||||
|
|
||||||
|
public static class Program
|
||||||
{
|
{
|
||||||
public static class Program
|
|
||||||
{
|
|
||||||
public static int Main(string[] args)
|
public static int Main(string[] args)
|
||||||
{
|
{
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
@@ -42,5 +39,4 @@ namespace Prospect.Server.Api
|
|||||||
{
|
{
|
||||||
webBuilder.UseStartup<Startup>();
|
webBuilder.UseStartup<Startup>();
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
namespace Prospect.Server.Api.Services.Auth
|
namespace Prospect.Server.Api.Services.Auth;
|
||||||
|
|
||||||
|
public static class AuthClaimTypes
|
||||||
{
|
{
|
||||||
public static class AuthClaimTypes
|
|
||||||
{
|
|
||||||
public const string UserId = "user_id";
|
public const string UserId = "user_id";
|
||||||
public const string EntityId = "entity_id";
|
public const string EntityId = "entity_id";
|
||||||
public const string Type = "type";
|
public const string Type = "type";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
using System;
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IdentityModel.Tokens.Jwt;
|
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.IdentityModel.Tokens;
|
using Microsoft.IdentityModel.Tokens;
|
||||||
using Prospect.Server.Api.Services.Database.Models;
|
using Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth
|
namespace Prospect.Server.Api.Services.Auth;
|
||||||
|
|
||||||
|
public class AuthTokenService
|
||||||
{
|
{
|
||||||
public class AuthTokenService
|
|
||||||
{
|
|
||||||
private const string DefaultIssuer = "ProspectApi";
|
private const string DefaultIssuer = "ProspectApi";
|
||||||
private const string DefaultAudience = "Prospect";
|
private const string DefaultAudience = "Prospect";
|
||||||
|
|
||||||
@@ -79,5 +77,4 @@ namespace Prospect.Server.Api.Services.Auth
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
namespace Prospect.Server.Api.Services.Auth
|
namespace Prospect.Server.Api.Services.Auth;
|
||||||
|
|
||||||
|
public class AuthTokenSettings
|
||||||
{
|
{
|
||||||
public class AuthTokenSettings
|
|
||||||
{
|
|
||||||
public string Secret { get; set; }
|
public string Secret { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace Prospect.Server.Api.Services.Auth
|
namespace Prospect.Server.Api.Services.Auth;
|
||||||
|
|
||||||
|
public static class AuthType
|
||||||
{
|
{
|
||||||
public static class AuthType
|
|
||||||
{
|
|
||||||
public const string User = "User";
|
public const string User = "User";
|
||||||
public const string Entity = "Entity";
|
public const string Entity = "Entity";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,11 @@
|
|||||||
using System;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
|
||||||
using Prospect.Server.Api.Services.Auth.Entity;
|
using Prospect.Server.Api.Services.Auth.Entity;
|
||||||
using Prospect.Server.Api.Services.Auth.User;
|
using Prospect.Server.Api.Services.Auth.User;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth
|
namespace Prospect.Server.Api.Services.Auth;
|
||||||
|
|
||||||
|
public static class AuthenticationBuilderExtensions
|
||||||
{
|
{
|
||||||
public static class AuthenticationBuilderExtensions
|
|
||||||
{
|
|
||||||
public static AuthenticationBuilder AddUserAuthentication(this AuthenticationBuilder authenticationBuilder, Action<UserAuthenticationOptions> options)
|
public static AuthenticationBuilder AddUserAuthentication(this AuthenticationBuilder authenticationBuilder, Action<UserAuthenticationOptions> options)
|
||||||
{
|
{
|
||||||
return authenticationBuilder.AddScheme<UserAuthenticationOptions, UserAuthenticationHandler>(UserAuthenticationOptions.DefaultScheme, options);
|
return authenticationBuilder.AddScheme<UserAuthenticationOptions, UserAuthenticationHandler>(UserAuthenticationOptions.DefaultScheme, options);
|
||||||
@@ -16,5 +15,4 @@ namespace Prospect.Server.Api.Services.Auth
|
|||||||
{
|
{
|
||||||
return authenticationBuilder.AddScheme<EntityAuthenticationOptions, EntityAuthenticationHandler>(EntityAuthenticationOptions.DefaultScheme, options);
|
return authenticationBuilder.AddScheme<EntityAuthenticationOptions, EntityAuthenticationHandler>(EntityAuthenticationOptions.DefaultScheme, options);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using System.Security.Claims;
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Claims;
|
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Prospect.Server.Api.Models.Client;
|
using Prospect.Server.Api.Models.Client;
|
||||||
using Prospect.Server.Api.Services.Auth.Extensions;
|
using Prospect.Server.Api.Services.Auth.Extensions;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth.Entity
|
namespace Prospect.Server.Api.Services.Auth.Entity;
|
||||||
|
|
||||||
|
public class EntityAuthenticationHandler : AuthenticationHandler<EntityAuthenticationOptions>
|
||||||
{
|
{
|
||||||
public class EntityAuthenticationHandler : AuthenticationHandler<EntityAuthenticationOptions>
|
|
||||||
{
|
|
||||||
private const string Header = "X-EntityToken";
|
private const string Header = "X-EntityToken";
|
||||||
private const string Type = AuthType.Entity;
|
private const string Type = AuthType.Entity;
|
||||||
|
|
||||||
@@ -83,5 +78,4 @@ namespace Prospect.Server.Api.Services.Auth.Entity
|
|||||||
|
|
||||||
await Response.WriteAsync(JsonSerializer.Serialize(Res));
|
await Response.WriteAsync(JsonSerializer.Serialize(Res));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth.Entity
|
namespace Prospect.Server.Api.Services.Auth.Entity;
|
||||||
|
|
||||||
|
public class EntityAuthenticationOptions : AuthenticationSchemeOptions
|
||||||
{
|
{
|
||||||
public class EntityAuthenticationOptions : AuthenticationSchemeOptions
|
|
||||||
{
|
|
||||||
public const string DefaultScheme = "EntityAuth";
|
public const string DefaultScheme = "EntityAuth";
|
||||||
public string Scheme => DefaultScheme;
|
public string Scheme => DefaultScheme;
|
||||||
public string AuthenticationType = DefaultScheme;
|
public string AuthenticationType = DefaultScheme;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Prospect.Server.Api.Exceptions;
|
using Prospect.Server.Api.Exceptions;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth.Extensions
|
namespace Prospect.Server.Api.Services.Auth.Extensions;
|
||||||
|
|
||||||
|
public static class ClaimsPrincipalExtensions
|
||||||
{
|
{
|
||||||
public static class ClaimsPrincipalExtensions
|
|
||||||
{
|
|
||||||
public static string FindAuthUserId(this ClaimsPrincipal principal)
|
public static string FindAuthUserId(this ClaimsPrincipal principal)
|
||||||
{
|
{
|
||||||
return Find(principal, AuthClaimTypes.UserId);
|
return Find(principal, AuthClaimTypes.UserId);
|
||||||
@@ -30,5 +30,4 @@ namespace Prospect.Server.Api.Services.Auth.Extensions
|
|||||||
|
|
||||||
return claim.Value;
|
return claim.Value;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,20 +1,15 @@
|
|||||||
using System.Collections.Generic;
|
using System.Security.Claims;
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Claims;
|
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Prospect.Server.Api.Models.Client;
|
using Prospect.Server.Api.Models.Client;
|
||||||
using Prospect.Server.Api.Services.Auth.Extensions;
|
using Prospect.Server.Api.Services.Auth.Extensions;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth.User
|
namespace Prospect.Server.Api.Services.Auth.User;
|
||||||
|
|
||||||
|
public class UserAuthenticationHandler : AuthenticationHandler<UserAuthenticationOptions>
|
||||||
{
|
{
|
||||||
public class UserAuthenticationHandler : AuthenticationHandler<UserAuthenticationOptions>
|
|
||||||
{
|
|
||||||
private const string Header = "X-Authorization";
|
private const string Header = "X-Authorization";
|
||||||
private const string Type = AuthType.User;
|
private const string Type = AuthType.User;
|
||||||
|
|
||||||
@@ -81,5 +76,4 @@ namespace Prospect.Server.Api.Services.Auth.User
|
|||||||
ErrorMessage = Failure
|
ErrorMessage = Failure
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Auth.User
|
namespace Prospect.Server.Api.Services.Auth.User;
|
||||||
|
|
||||||
|
public class UserAuthenticationOptions : AuthenticationSchemeOptions
|
||||||
{
|
{
|
||||||
public class UserAuthenticationOptions : AuthenticationSchemeOptions
|
|
||||||
{
|
|
||||||
public const string DefaultScheme = "UserAuth";
|
public const string DefaultScheme = "UserAuth";
|
||||||
public string Scheme => DefaultScheme;
|
public string Scheme => DefaultScheme;
|
||||||
public string AuthenticationType = DefaultScheme;
|
public string AuthenticationType = DefaultScheme;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database
|
namespace Prospect.Server.Api.Services.Database;
|
||||||
|
|
||||||
|
public abstract class BaseDbService<T>
|
||||||
{
|
{
|
||||||
public abstract class BaseDbService<T>
|
|
||||||
{
|
|
||||||
protected BaseDbService(IOptions<DatabaseSettings> options, string collection)
|
protected BaseDbService(IOptions<DatabaseSettings> options, string collection)
|
||||||
{
|
{
|
||||||
var settings = options.Value;
|
var settings = options.Value;
|
||||||
@@ -16,5 +16,4 @@ namespace Prospect.Server.Api.Services.Database
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected IMongoCollection<T> Collection { get; }
|
protected IMongoCollection<T> Collection { get; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
using System.Threading.Tasks;
|
using Microsoft.Extensions.Options;
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
using Prospect.Server.Api.Services.Database.Models;
|
using Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database
|
namespace Prospect.Server.Api.Services.Database;
|
||||||
|
|
||||||
|
public class DbEntityService : BaseDbService<PlayFabEntity>
|
||||||
{
|
{
|
||||||
public class DbEntityService : BaseDbService<PlayFabEntity>
|
|
||||||
{
|
|
||||||
public DbEntityService(IOptions<DatabaseSettings> settings) : base(settings, nameof(PlayFabEntity))
|
public DbEntityService(IOptions<DatabaseSettings> settings) : base(settings, nameof(PlayFabEntity))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -34,5 +33,4 @@ namespace Prospect.Server.Api.Services.Database
|
|||||||
return await FindAsync(userId) ??
|
return await FindAsync(userId) ??
|
||||||
await CreateAsync(userId);
|
await CreateAsync(userId);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
using System;
|
using Microsoft.Extensions.Options;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
using Prospect.Server.Api.Services.Database.Models;
|
using Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database
|
namespace Prospect.Server.Api.Services.Database;
|
||||||
|
|
||||||
|
public class DbUserDataService : BaseDbService<PlayFabUserData>
|
||||||
{
|
{
|
||||||
public class DbUserDataService : BaseDbService<PlayFabUserData>
|
|
||||||
{
|
|
||||||
public DbUserDataService(IOptions<DatabaseSettings> options) : base(options, nameof(PlayFabUserData))
|
public DbUserDataService(IOptions<DatabaseSettings> options) : base(options, nameof(PlayFabUserData))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -56,5 +54,4 @@ namespace Prospect.Server.Api.Services.Database
|
|||||||
|
|
||||||
await Collection.UpdateOneAsync(data => data.Id == dataId, update);
|
await Collection.UpdateOneAsync(data => data.Id == dataId, update);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,15 +1,12 @@
|
|||||||
using System.Collections.Generic;
|
using Microsoft.Extensions.Options;
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Extensions.Options;
|
|
||||||
using MongoDB.Driver;
|
using MongoDB.Driver;
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
using Prospect.Server.Api.Services.Database.Models;
|
using Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database
|
namespace Prospect.Server.Api.Services.Database;
|
||||||
|
|
||||||
|
public class DbUserService : BaseDbService<PlayFabUser>
|
||||||
{
|
{
|
||||||
public class DbUserService : BaseDbService<PlayFabUser>
|
|
||||||
{
|
|
||||||
public DbUserService(IOptions<DatabaseSettings> settings) : base(settings, nameof(PlayFabUser))
|
public DbUserService(IOptions<DatabaseSettings> settings) : base(settings, nameof(PlayFabUser))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -46,5 +43,4 @@ namespace Prospect.Server.Api.Services.Database
|
|||||||
return await FindAsync(type, key) ??
|
return await FindAsync(type, key) ??
|
||||||
await CreateAsync(type, key);
|
await CreateAsync(type, key);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System.Security.Cryptography;
|
||||||
using System.Security.Cryptography;
|
|
||||||
using MongoDB.Bson.Serialization;
|
using MongoDB.Bson.Serialization;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database.Generator
|
namespace Prospect.Server.Api.Services.Database.Generator;
|
||||||
|
|
||||||
|
public class PlayFabIdGenerator : IIdGenerator
|
||||||
{
|
{
|
||||||
public class PlayFabIdGenerator : IIdGenerator
|
|
||||||
{
|
|
||||||
private static readonly RNGCryptoServiceProvider Random = new RNGCryptoServiceProvider();
|
private static readonly RNGCryptoServiceProvider Random = new RNGCryptoServiceProvider();
|
||||||
|
|
||||||
public object GenerateId(object container, object document)
|
public object GenerateId(object container, object document)
|
||||||
@@ -19,5 +18,4 @@ namespace Prospect.Server.Api.Services.Database.Generator
|
|||||||
{
|
{
|
||||||
return id is not string idStr || string.IsNullOrEmpty(idStr);
|
return id is not string idStr || string.IsNullOrEmpty(idStr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,18 +1,17 @@
|
|||||||
using MongoDB.Bson.Serialization.Attributes;
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
using Prospect.Server.Api.Services.Database.Generator;
|
using Prospect.Server.Api.Services.Database.Generator;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database.Models
|
namespace Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// title_player_account
|
||||||
|
/// </summary>
|
||||||
|
public class PlayFabEntity
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// title_player_account
|
|
||||||
/// </summary>
|
|
||||||
public class PlayFabEntity
|
|
||||||
{
|
|
||||||
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
[BsonRequired]
|
[BsonRequired]
|
||||||
[BsonElement("UserId")]
|
[BsonElement("UserId")]
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,13 @@
|
|||||||
using System.Collections.Generic;
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
|
||||||
using Prospect.Server.Api.Services.Database.Generator;
|
using Prospect.Server.Api.Services.Database.Generator;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database.Models
|
namespace Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// master_player_account
|
||||||
|
/// </summary>
|
||||||
|
public class PlayFabUser
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// master_player_account
|
|
||||||
/// </summary>
|
|
||||||
public class PlayFabUser
|
|
||||||
{
|
|
||||||
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
[BsonId(IdGenerator = typeof(PlayFabIdGenerator))]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
@@ -19,5 +18,4 @@ namespace Prospect.Server.Api.Services.Database.Models
|
|||||||
[BsonRequired]
|
[BsonRequired]
|
||||||
[BsonElement("Auth")]
|
[BsonElement("Auth")]
|
||||||
public List<PlayFabUserAuth> Auth { get; set; }
|
public List<PlayFabUserAuth> Auth { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
using MongoDB.Bson.Serialization.Attributes;
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database.Models
|
namespace Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
|
public class PlayFabUserAuth
|
||||||
{
|
{
|
||||||
public class PlayFabUserAuth
|
|
||||||
{
|
|
||||||
[BsonElement("Type")]
|
[BsonElement("Type")]
|
||||||
public PlayFabUserAuthType Type { get; set; }
|
public PlayFabUserAuthType Type { get; set; }
|
||||||
|
|
||||||
[BsonElement("Key")]
|
[BsonElement("Key")]
|
||||||
public string Key { get; set; }
|
public string Key { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
namespace Prospect.Server.Api.Services.Database.Models
|
namespace Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
|
public enum PlayFabUserAuthType
|
||||||
{
|
{
|
||||||
public enum PlayFabUserAuthType
|
|
||||||
{
|
|
||||||
Epic,
|
Epic,
|
||||||
Steam
|
Steam
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using System;
|
using MongoDB.Bson;
|
||||||
using MongoDB.Bson;
|
|
||||||
using MongoDB.Bson.Serialization.Attributes;
|
using MongoDB.Bson.Serialization.Attributes;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.Database.Models
|
namespace Prospect.Server.Api.Services.Database.Models;
|
||||||
|
|
||||||
|
public class PlayFabUserData
|
||||||
{
|
{
|
||||||
public class PlayFabUserData
|
|
||||||
{
|
|
||||||
[BsonId]
|
[BsonId]
|
||||||
[BsonRepresentation(BsonType.ObjectId)]
|
[BsonRepresentation(BsonType.ObjectId)]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
@@ -32,5 +31,4 @@ namespace Prospect.Server.Api.Services.Database.Models
|
|||||||
[BsonRequired]
|
[BsonRequired]
|
||||||
[BsonElement("LastUpdated")]
|
[BsonElement("LastUpdated")]
|
||||||
public DateTime LastUpdated { get; set; }
|
public DateTime LastUpdated { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,10 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
namespace Prospect.Server.Api.Services.UserData;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.UserData
|
public class TitleDataService
|
||||||
{
|
{
|
||||||
public class TitleDataService
|
|
||||||
{
|
|
||||||
public TitleDataService(ILogger<TitleDataService> logger)
|
public TitleDataService(ILogger<TitleDataService> logger)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -29,5 +26,4 @@ namespace Prospect.Server.Api.Services.UserData
|
|||||||
|
|
||||||
return TitleDataDefault.Data;
|
return TitleDataDefault.Data;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,14 +1,10 @@
|
|||||||
using System;
|
using Prospect.Server.Api.Models.Client.Data;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using Prospect.Server.Api.Models.Client.Data;
|
|
||||||
using Prospect.Server.Api.Services.Database;
|
using Prospect.Server.Api.Services.Database;
|
||||||
|
|
||||||
namespace Prospect.Server.Api.Services.UserData
|
namespace Prospect.Server.Api.Services.UserData;
|
||||||
|
|
||||||
|
public class UserDataService
|
||||||
{
|
{
|
||||||
public class UserDataService
|
|
||||||
{
|
|
||||||
private readonly ILogger<UserDataService> _logger;
|
private readonly ILogger<UserDataService> _logger;
|
||||||
private readonly DbUserDataService _dbUserDataService;
|
private readonly DbUserDataService _dbUserDataService;
|
||||||
|
|
||||||
@@ -178,5 +174,4 @@ namespace Prospect.Server.Api.Services.UserData
|
|||||||
await _dbUserDataService.UpdateValueAsync(data.Id, value);
|
await _dbUserDataService.UpdateValueAsync(data.Id, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,21 +1,15 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
|
||||||
using Microsoft.Extensions.Hosting;
|
|
||||||
using Prospect.Server.Api.Config;
|
using Prospect.Server.Api.Config;
|
||||||
using Prospect.Server.Api.Converters;
|
using Prospect.Server.Api.Converters;
|
||||||
using Prospect.Server.Api.Middleware;
|
using Prospect.Server.Api.Middleware;
|
||||||
using Prospect.Server.Api.Services.Auth;
|
using Prospect.Server.Api.Services.Auth;
|
||||||
using Prospect.Server.Api.Services.Auth.User;
|
|
||||||
using Prospect.Server.Api.Services.Database;
|
using Prospect.Server.Api.Services.Database;
|
||||||
using Prospect.Server.Api.Services.UserData;
|
using Prospect.Server.Api.Services.UserData;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
namespace Prospect.Server.Api
|
namespace Prospect.Server.Api;
|
||||||
|
|
||||||
|
public class Startup
|
||||||
{
|
{
|
||||||
public class Startup
|
|
||||||
{
|
|
||||||
public Startup(IConfiguration configuration)
|
public Startup(IConfiguration configuration)
|
||||||
{
|
{
|
||||||
Configuration = configuration;
|
Configuration = configuration;
|
||||||
@@ -68,5 +62,4 @@ namespace Prospect.Server.Api
|
|||||||
endpoints.MapControllers();
|
endpoints.MapControllers();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
namespace Prospect.Server.Steam;
|
||||||
|
|
||||||
namespace Prospect.Server.Steam
|
public class AppDlc
|
||||||
{
|
{
|
||||||
public class AppDlc
|
|
||||||
{
|
|
||||||
public uint AppId { get; set; }
|
public uint AppId { get; set; }
|
||||||
|
|
||||||
public List<uint> Licenses { get; set; }
|
public List<uint> Licenses { get; set; }
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
using System;
|
using System.Net;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Net;
|
|
||||||
|
|
||||||
namespace Prospect.Server.Steam
|
namespace Prospect.Server.Steam;
|
||||||
|
|
||||||
|
public class AppTicket
|
||||||
{
|
{
|
||||||
public class AppTicket
|
|
||||||
{
|
|
||||||
private AppTicket()
|
private AppTicket()
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -163,5 +160,4 @@ namespace Prospect.Server.Steam
|
|||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net6.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
|
<ImplicitUsings>true</ImplicitUsings>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace Prospect.Server.Steam
|
namespace Prospect.Server.Steam;
|
||||||
|
|
||||||
|
internal static class SteamCrypto
|
||||||
{
|
{
|
||||||
internal static class SteamCrypto
|
|
||||||
{
|
|
||||||
private const string SystemCertificate = "-----BEGIN PUBLIC KEY-----\n" +
|
private const string SystemCertificate = "-----BEGIN PUBLIC KEY-----\n" +
|
||||||
"MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDf7BrWLBBmLBc1OhSwfFkRf53T\n" +
|
"MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDf7BrWLBBmLBc1OhSwfFkRf53T\n" +
|
||||||
"2Ct64+AVzRkeRuh7h3SiGEYxqQMUeYKO6UWiSRKpI2hzic9pobFhRr3Bvr/WARvY\n" +
|
"2Ct64+AVzRkeRuh7h3SiGEYxqQMUeYKO6UWiSRKpI2hzic9pobFhRr3Bvr/WARvY\n" +
|
||||||
@@ -28,5 +28,4 @@ namespace Prospect.Server.Steam
|
|||||||
|
|
||||||
return dataVerified;
|
return dataVerified;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user