forked from SoDOff-Project/sodoff
support for Futureland (IsValidApiToken)
This commit is contained in:
parent
f611b9203c
commit
ca95caf783
@ -134,6 +134,19 @@ public class AuthenticationController : Controller {
|
||||
return Ok(new UserInfo {});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/xml")]
|
||||
[Route("AuthenticationWebService.asmx/IsValidApiToken")] // used by World Of Jumpstart (FutureLand)
|
||||
public IActionResult IsValidApiToken_V1([FromForm] Guid? apiToken) {
|
||||
if (apiToken is null)
|
||||
return Ok(false);
|
||||
User? user = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.User;
|
||||
Viking? viking = ctx.Sessions.FirstOrDefault(e => e.ApiToken == apiToken)?.Viking;
|
||||
if (user is null && viking is null)
|
||||
return Ok(false);
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Produces("application/xml")]
|
||||
[Route("AuthenticationWebService.asmx/IsValidApiToken_V2")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user