package ${basePackage}.action.ajax.system;

import ${basePackage}.module.system.req.AuthLoginRequest;
import ${basePackage}.module.system.rsp.AuthLoginResponse;

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

public class AuthAjax {

    public AuthLoginResponse login(AuthLoginRequest request, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {
        AuthLoginResponse response = new AuthLoginResponse();

        // todo 设置cookie
        Cookie token = new Cookie("token", "");
        token.setDomain(httpServletRequest.getServerName());
        token.setPath("/");
        httpServletResponse.addCookie(token);

        return response;
    }
}
