code: public void save(HttpServletRequest req, HttpServletResponse res) {
  		AuthenticationResult authResult = new AuthenticationResult(AuthResult.SUCCESS, (String) null);
  		save(req, res, authResult);
  		List<Cookie> cookieList = authResult.getCookies();
  		if (cookieList != null && cookieList.size() > 0) {
  			CookieHelper.addCookiesToResponse(cookieList, res);
  		}
  	}
docs: Save POST parameters to the cookie or session.
  
  @param req
  @param res