using iWare.Authorize.Dto; using Microsoft.AspNetCore.Mvc; namespace iWare.Authorize { [ApiController] [Route("[controller]")] public class WareAuthorizeController : ControllerBase { private readonly ILogger _logger; public WareAuthorizeController(ILogger logger) { _logger = logger; } /// /// ÑéÖ¤ÊÚȨ /// /// /// [HttpGet(Name = "ValidateLicense")] public AuthorizeFunRetEntity ValidateLicense([FromQuery] ValidateLicenseInput input) { try { //if (input == null) //{ // return AuthorizeFunRetEntity.Fail("²ÎÊý²»ÄÜΪ¿Õ"); //} //if (string.IsNullOrEmpty(input.FolderPath)) //{ // return AuthorizeFunRetEntity.Fail("ÊÚȨ·¾¶²»ÄÜΪ¿Õ"); //} return AuthorizeHelper.ValidateLicense(input); } catch (Exception ex) { return AuthorizeFunRetEntity.Fail("Òì³£:" + ex.Message); } } } }