HttpServletRequest.login does not keep logged in for subsequent requests
问题 After logging in using HttpServletRequest.login(String, String) , using the code below, on following requests I still get a Basic Authentication prompt. Why is the login function not working in my configuration? My endpoint: @POST @Path("login") @Consumes(MediaType.APPLICATION_JSON) public void login(@Valid LoginRequest loginRequest) { try { User user = userController.findUserByUsername(loginRequest.getUsername()).orElseThrow(NotFoundException::new); httpServletRequest.login(loginRequest