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);
|
}
|
}
|
}
|
}
|