goja-web/src/main/java/goja/security/goja/SecurityKit.java
public static <T extends Model> void saveMemberInCookie(T user, boolean save,
                                                            HttpServletRequest request, HttpServletResponse response) {
        String new_value =
                getLoginKey(user, Requests.remoteIP(request), request.getHeader("user-agent"));
        int max_age = save ? MAX_AGE : -1;
        Requests.deleteCookie(request, response, COOKIE_LOGIN, true);
        Requests.setCookie(request, response, COOKIE_LOGIN, new_value, max_age, true);
    }
public static <T extends Model> void saveMemberInCookie(T user, boolean save,
                                                            HttpServletRequest request, HttpServletResponse response) {
        String new_value =
                getLoginKey(user, Requests.remoteIP(request), request.getHeader("user-agent"));
        int max_age = save ? MAX_AGE : -1;
        Requests.deleteCookie(request, response, COOKIE_LOGIN, true);
        Requests.setCookie(request, response, COOKIE_LOGIN, new_value, max_age, true);
    }
public static < T extends Model > void saveMemberInCookie ( T user , boolean save , HttpServletRequest request , HttpServletResponse response ) { String new_value = getLoginKey ( user , Requests . remoteIP ( request ) , request . getHeader ( "user-agent" ) ) ; int max_age = save ? MAX_AGE : - 1 ; Requests . deleteCookie ( request , response , COOKIE_LOGIN , true ) ; Requests . setCookie ( request , response , COOKIE_LOGIN , new_value , max_age , true ) ; }
Store user information in a cookie logged in.

@param user     The user has logged on.
@param save     has save.
@param request  request
@param response http response
Store user information in a cookie logged in .