Class UserSessionEnder

java.lang.Object
com.iizix.server.user.UserSessionEnder

public final class UserSessionEnder extends Object
Ends every open session of a user in every application of this server, as the user's own sign-out ends the one session it is made in (CC-SERVERADMIN-SIGNOUT-DEVICES, DV-1): every client of such a session is told to load the application again - which gives it a new session in which nobody is signed in - and the session is disposed of, at once when it has no client to tell, after GRACE_MS otherwise, so that what the clients were sent reaches them before their connection is closed. The proof of the user's second factor goes with the session.

The sessions are found by their signed-in user's ID, not by the key they are counted under, so that a session of an application with its own sign-in and one with an external login are both found. A server without active sessions (none started, or a test without a server) has nothing to end.

Author:
Christopher Mindus
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    How long a session with clients lives on after they were told to load the application again, milliseconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    endAll(long uid, String userName, String why)
    Ends every open session of a user in every application.
  • Field Details

    • GRACE_MS

      public static final long GRACE_MS
      How long a session with clients lives on after they were told to load the application again, milliseconds.
      See Also:
  • Method Details

    • endAll

      public static int endAll(long uid, String userName, String why)
      Ends every open session of a user in every application.
      Parameters:
      uid - The user ID of IZS.USERS.
      userName - The user name, for the log.
      why - Why, for the log: "signed out of every device by an administrator".
      Returns:
      The number of sessions ended.