code: protected final void clearAuthenticationAttributes() {
          HttpSession session = http.getCurrentRequest().getSession(false);
  
          if (session == null) {
              return;
          }
  
          session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION);
      }
docs: Removes temporary authentication-related data which may have been stored in the session
  during the authentication process.