using Furion.DynamicApiController; namespace SafeCampus.Plugin.Mqtt { /// /// mqtt服务控制器 /// [ApiDescriptionSettings(Tag = "mqtt服务")] [Route("mqtt")] public class MqttController : IDynamicApiController { private readonly IMqttService _mqttService; public MqttController(IMqttService mqttService) { _mqttService = mqttService; } /// /// 获取mqtt登录参数 /// /// [HttpGet("getParameter")] public async Task GetParameter() { return await _mqttService.GetWebLoginParameter(); } /// /// mqtt认证 /// /// /// [HttpPost("auth")] [AllowAnonymous] [NonUnify] public async Task Auth([FromBody] MqttAuthInput input) { return await _mqttService.Auth(input); } } }