use different key format in `GetRules` if client version is one of the wojs lands

This commit is contained in:
Alan Moon 2025-03-13 11:41:37 -07:00
parent 2b0490954a
commit f44f80ec38

View File

@ -24,11 +24,14 @@ public class AuthenticationController : Controller {
[Produces("application/xml")] [Produces("application/xml")]
[Route("v3/AuthenticationWebService.asmx/GetRules")] [Route("v3/AuthenticationWebService.asmx/GetRules")]
[EncryptResponse] [EncryptResponse]
public IActionResult GetRules() { public IActionResult GetRules([FromForm] string apiKey) {
GetProductRulesResponse response = new GetProductRulesResponse { GetProductRulesResponse response = new GetProductRulesResponse {
GlobalSecretKey = "11A0CC5A-C4DF-4A0E-931C-09A44C9966AE" GlobalSecretKey = "11A0CC5A-C4DF-4A0E-931C-09A44C9966AE"
}; };
if (ClientVersion.GetVersion(apiKey) <= ClientVersion.WoJS_AdvLand)
response.GlobalSecretKey = "11A0CC5AC4DF4A0E931C09A44C9966AE"; // lands use different key format
return Ok(response); return Ok(response);
} }