docs: protected void unsuccessfulAuthentication(PortletRequest request, PortletResponse response,
              AuthenticationException failed) {
          SecurityContextHolder.clearContext();
  
          if (logger.isDebugEnabled()) {
              logger.debug("Cleared security context due to exception", failed);
          }
          request.setAttribute(WebAttributes.AUTHENTICATION_EXCEPTION, failed);
      }