code: public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception {
          if (isLogoutRequest(context.getRequest())) {
              logger.debug("Processing logout request");
  
              Authentication auth = SecurityUtils.getAuthentication(context.getRequest());
              if (auth != null) {
                  authenticationManager.invalidateAuthentication(auth);
              }
  
              onLogoutSuccess(context, auth);
          } else {
              processorChain.processRequest(context);
          }
      }
docs: Checks if the request URL matches the {@code logoutUrl} and the HTTP method matches the {@code logoutMethod}.
  If it does, it proceeds to logout the user, by invalidating the authentication through
  {@link AuthenticationManager#invalidateAuthentication(Authentication)}
  
  @param context        the context which holds the current request and response
  @param processorChain the processor chain, used to call the next processor