code: @Override
      public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception {
          AddSecurityCookiesResponseWrapper response = wrapResponse(context);
          context.setResponse(response);
  
          logger.debug("Wrapped response in a {}", response.getClass().getName());
  
          try {
              processorChain.processRequest(context);
          } finally {
              response.addCookies();
          }
      }
docs: Wraps the response in a wrapper that adds (or deletes) the security cookies before the response is sent.
  
  @param context        the context which holds the current request and response
  @param processorChain the {@link RequestSecurityProcessorChain}, used to call the next processor