20 lines
735 B
C#
20 lines
735 B
C#
using Microsoft.AspNetCore.Http;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using SVSim.EmulatedEntrypoint.Security;
|
|
|
|
namespace SVSim.EmulatedEntrypoint.Controllers
|
|
{
|
|
/// <summary>
|
|
/// A base controller for SVSim with helpers for getting some values.
|
|
/// </summary>
|
|
[Route("api/[controller]")]
|
|
[ApiController]
|
|
public abstract class SVSimController : ControllerBase
|
|
{
|
|
/// <summary>
|
|
/// Returns the UdId of the user making the request. Can be null or empty, as only certain requests will send it. Known requests to send this value are: SignUp, CheckSpecialTitle, CheckiCloudUser, MigrateiCloudUser
|
|
/// </summary>
|
|
public string? UdId => Encryption.Decode(Request.Headers["UDID"]);
|
|
}
|
|
}
|