package com.das.modules.auth.service;


import com.das.common.result.R;
import com.das.modules.auth.domain.LoginUserDetails;
import com.das.modules.auth.domain.vo.LoginVO;
import com.fasterxml.jackson.core.JsonProcessingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author chenhaojie
 * @Description
 */
public interface ILoginService {

    /**
     * 登录接口
     *
     * @param data 登录请求
     * @return 登录成功
     */
    LoginUserDetails login(String data, HttpServletRequest request, HttpServletResponse response) throws JsonProcessingException;

    /**
     * 退出登录
     * @return 是否退出成功
     */
    boolean logout(HttpServletRequest request);

    /**
     * 刷新token
     * @param refreshToken
     * @return
     */
    LoginVO refreshToken(String refreshToken);
}
