不再使用的代码清理
This commit is contained in:
@@ -2,6 +2,9 @@ package com.emotion.service;
|
||||
|
||||
import com.emotion.dto.request.LoginRequest;
|
||||
import com.emotion.dto.request.RegisterRequest;
|
||||
import com.emotion.dto.request.ResetPasswordRequest;
|
||||
import com.emotion.dto.response.ResetPasswordResponse;
|
||||
|
||||
import com.emotion.dto.response.AuthResponse;
|
||||
import com.emotion.dto.response.CaptchaResponse;
|
||||
import com.emotion.dto.response.SmsCodeResponse;
|
||||
@@ -11,52 +14,60 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 认证服务接口
|
||||
*
|
||||
*
|
||||
* @author emotion-museum
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
public interface AuthService {
|
||||
|
||||
|
||||
/**
|
||||
* 用户登录
|
||||
*
|
||||
*
|
||||
* @param request 登录请求
|
||||
* @return 认证响应
|
||||
*/
|
||||
AuthResponse login(LoginRequest request);
|
||||
|
||||
|
||||
/**
|
||||
* 用户注册
|
||||
*
|
||||
*
|
||||
* @param request 注册请求
|
||||
* @return 认证响应
|
||||
*/
|
||||
/**
|
||||
* 重置密码(手机号 + 验证码)
|
||||
*
|
||||
* @param request 重置密码请求
|
||||
* @return 重置密码响应
|
||||
*/
|
||||
ResetPasswordResponse resetPassword(ResetPasswordRequest request);
|
||||
|
||||
AuthResponse register(RegisterRequest request);
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前用户信息
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户信息响应
|
||||
*/
|
||||
UserInfoResponse getCurrentUserInfo(String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 生成验证码
|
||||
*
|
||||
*
|
||||
* @return 验证码响应
|
||||
*/
|
||||
CaptchaResponse generateCaptcha();
|
||||
|
||||
|
||||
/**
|
||||
* 验证验证码
|
||||
*
|
||||
*
|
||||
* @param captchaKey 验证码key
|
||||
* @param captcha 验证码
|
||||
* @param captcha 验证码
|
||||
* @return 是否验证成功
|
||||
*/
|
||||
boolean validateCaptcha(String captchaKey, String captcha);
|
||||
|
||||
|
||||
/**
|
||||
* 用户登出
|
||||
*
|
||||
@@ -73,18 +84,18 @@ public interface AuthService {
|
||||
* @return 是否登出成功
|
||||
*/
|
||||
boolean logoutByToken(HttpServletRequest request);
|
||||
|
||||
|
||||
/**
|
||||
* 刷新访问令牌
|
||||
*
|
||||
*
|
||||
* @param refreshToken 刷新令牌
|
||||
* @return 新的认证响应
|
||||
*/
|
||||
AuthResponse refreshToken(String refreshToken);
|
||||
|
||||
|
||||
/**
|
||||
* 验证访问令牌
|
||||
*
|
||||
*
|
||||
* @param request HTTP请求
|
||||
* @return 是否有效
|
||||
*/
|
||||
@@ -92,20 +103,20 @@ public interface AuthService {
|
||||
|
||||
/**
|
||||
* 验证访问令牌
|
||||
*
|
||||
*
|
||||
* @param token 访问令牌
|
||||
* @return 是否有效
|
||||
*/
|
||||
boolean validateToken(String token);
|
||||
|
||||
|
||||
/**
|
||||
* 从令牌中获取用户ID
|
||||
*
|
||||
*
|
||||
* @param token 访问令牌
|
||||
* @return 用户ID
|
||||
*/
|
||||
String getUserIdFromToken(String token);
|
||||
|
||||
|
||||
/**
|
||||
* 从令牌中获取用户名
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user