
package cn.orionsec.ops.service.api;

import cn.orionsec.ops.entity.dto.user.UserDTO;
import cn.orionsec.ops.entity.request.user.UserLoginRequest;
import cn.orionsec.ops.entity.request.user.UserResetRequest;
import cn.orionsec.ops.entity.vo.user.UserLoginVO;

public interface PassportService {

    /**
     * 登录
     *
     * @param request request
     * @return wrapper
     */
    UserLoginVO login(UserLoginRequest request);

    /**
     * 登出
     */
    void logout();

    /**
     * 重置密码
     *
     * @param request request
     */
    void resetPassword(UserResetRequest request);

    /**
     * 通过token获取用户 所有通过token查用户都要用此方法
     *
     * @param token   token
     * @param checkIp 检查的ip 不检查设置为null
     * @return user
     */
    UserDTO getUserByToken(String token, String checkIp);

}
