using YBEE.EQM.Core;
namespace YBEE.EQM.Application;
///
/// 用户登录认证服务
///
[ApiDescriptionSettings(Name = "sys-auth")]
[Route("sys/auth")]
public class SysAuthAppService : IDynamicApiController
{
private readonly ISysAuthService _authService;
public SysAuthAppService(ISysAuthService authService)
{
_authService = authService;
}
///
/// 账户密码登录
///
///
///
[AllowAnonymous]
public async Task LoginByAccount(LoginInput input)
{
return await _authService.LoginByAccount(input);
}
///
/// 退出登录
///
///
[AllowAnonymous]
public async Task Logout()
{
await _authService.Logout();
}
///
/// 获取当前登录用户信息
///
///
public async Task GetLoginUser()
{
return await _authService.GetLoginUser();
}
///
/// 获取图形验证码
///
///
[AllowAnonymous]
[DisableOpLog]
public async Task GetCaptcha()
{
return await _authService.GetCaptcha();
}
///
/// 校验图形验证码
///
///
///
[AllowAnonymous]
[DisableOpLog]
public async Task VerifyCaptcha(GeneralCaptchaInput input)
{
return await _authService.VerifyCaptcha(input);
}
}