refactor: 添加 websocket 连接认证拦截器实现点对点指定用户发送消息;移除 easy-captcha 替换为 hutool-captcha验证码实现代码简化;重构认证接口控制层代码。

This commit is contained in:
haoxr
2023-09-12 18:25:16 +08:00
parent 87fcf022ba
commit 9453600715
37 changed files with 290 additions and 358 deletions

View File

@@ -0,0 +1,34 @@
package com.youlai.system.service;
import com.youlai.system.model.dto.CaptchaResult;
import com.youlai.system.model.dto.LoginResult;
/**
* 认证服务接口
*
* @author haoxr
* @since 2.4.0
*/
public interface AuthService {
/**
* 登录
*
* @param username 用户名
* @param password 密码
* @return 登录结果
*/
LoginResult login(String username, String password);
/**
* 登出
*/
void logout();
/**
* 获取验证码
*
* @return 验证码
*/
CaptchaResult getCaptcha();
}