Class SessionManager


  • public class SessionManager
    extends Object
    A utility class for managing sessions.
    Since:
    12.1
    • Constructor Detail

      • SessionManager

        public SessionManager()
    • Method Detail

      • revokeAllSessionsFor

        public void revokeAllSessionsFor​(String uniqueUserKey)
        Revokes all sessions for the user identified by the unique user key. Sessions including the current session will be revoked.
        Parameters:
        uniqueUserKey - the unique user key to revoke sessions for.
      • revokeOtherSessionsFor

        public void revokeOtherSessionsFor​(String uniqueUserKey,
                                           javax.servlet.http.HttpServletRequest req,
                                           javax.servlet.http.HttpServletResponse resp)
        Revokes all sessions for the user identified by the unique user key, except for the current session.
        Parameters:
        uniqueUserKey - the unique user key to revoke sessions for.
        req - the HttpServletRequest passed into the adapters IdpAuthenticationAdapter#lookupAuthN method
        resp - the HttpServletResponse passed into the adapters IdpAuthenticationAdapter#lookupAuthN method
      • revoke

        public void revoke​(String sri)
        Revokes a session identified by the given SRI (Session Reference Identifier).
        Parameters:
        sri - - The Session Reference Identifier to be revoked.