package com.persagy.dmp.auth.service;

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

/**
 * 鉴权接口
 * @author Charlie Yu
 * @date 2021-11-02
 */
public interface AuthService {

    /**
     * 登录认证
     * @param request
     * @param response
     */
    boolean validateLogin(HttpServletRequest request, HttpServletResponse response);

    /**
     * 登录成功处理
     * @param request
     * @param response
     */
    void loginSuccess(HttpServletRequest request, HttpServletResponse response);

    /**
     * 登录失败处理
     * @param request
     * @param response
     */
    void loginFailure(HttpServletRequest request, HttpServletResponse response);

    /**
     * 请求结束
     * @param request
     * @param response
     */
    void release(HttpServletRequest request, HttpServletResponse response);
}
