Я создаю собственную службу проверки подлинности в моем приложении spring mvc:
@Service
public class AuthenticationServiceImpl implements AuthenticationService {
@Autowired
UserService userService;
@Override
public void login(String email, String password) {
boolean isValid = userService.isValidLogin(email, password);
if(isValid) {
// ??? create a session cookie and add to http response
}
}
}
Как я могу создать и добавить файл cookie в ответ?