schangxiang@126.com
2025-04-02 00f40c5f6cd93e7dd0d9e2fd30c292bacc6b6b83
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using iWare.Authorize.Dto;
using Microsoft.AspNetCore.Mvc;
 
namespace iWare.Authorize
{
    [ApiController]
    [Route("[controller]")]
    public class WareAuthorizeController : ControllerBase
    {
        private readonly ILogger<WareAuthorizeController> _logger;
 
        public WareAuthorizeController(ILogger<WareAuthorizeController> logger)
        {
            _logger = logger;
        }
 
        /// <summary>
        /// ÑéÖ¤ÊÚȨ
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        [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);
            }
        }
    }
}