docs: @Override
      public SecurityContext loadContext(PortletRequestResponseHolder requestResponseHolder) {
          final PortletRequest request = requestResponseHolder.getRequest();
          final PortletSession portletSession = request.getPortletSession(false);
  
          SecurityContext context = readSecurityContextFromSession(portletSession);
  
          if (context == null) {
              if (logger.isDebugEnabled()) {
                  logger.debug("No SecurityContext was available from the PortletSession: " + portletSession +". " +
                          "A new one will be created.");
              }
              context = generateNewContext();
  
          }
  
          //Capture pre-request state
          requestResponseHolder.setAuthBeforeExecution(context.getAuthentication());
          requestResponseHolder.setContextBeforeExecution(context);
          requestResponseHolder.setPortletSessionExistedAtStartOfRequest(portletSession != null);
  
          return context;
      }