Class UserSessionGuard

java.lang.Object
org.exoplatform.web.UserSessionGuard

public final class UserSessionGuard extends Object
Reads the user of a conversation once, when the conversation is built, and ends the session of a user that is disabled or no longer exists. A change of the user makes every node build its conversations again (ConversationRegistry invalidateUser), so each node reads the user again at the next request.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    endSessionOfAGoneUser(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.exoplatform.services.security.ConversationState state, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.services.security.ConversationRegistry conversationRegistry)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • endSessionOfAGoneUser

      public static boolean endSessionOfAGoneUser(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.exoplatform.services.security.ConversationState state, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.services.security.ConversationRegistry conversationRegistry) throws IOException
      Parameters:
      request - the current request
      response - the current response
      state - the conversation of the request
      organizationService - the organization service
      conversationRegistry - the conversation registry
      Returns:
      true when the user is disabled or deleted: the session is ended and the response written, the caller stops the request
      Throws:
      IOException - when the response cannot be written