Interface SessionManager

    • Method Detail

      • ejectSessions

        int ejectSessions​(AuthenticationUser user,
                          int numberToEject)
        Ejects one or more of a user's sessions.
        Parameters:
        user - the AuthenticationUser instance whose sessions are to be ejected.
        numberToEject - the number of sessions to eject, or -1 for all sessions.
        Returns:
        the number of sessions successfully ejected
      • ejectSessionsByApplicationId

        int ejectSessionsByApplicationId​(AuthenticationUser user,
                                         int numberToEject,
                                         java.lang.String applicationId)
        Ejects one or more of a user's sessions based on machine application identifier.
        Parameters:
        user - the AuthenticationUser instance whose sessions are to be ejected.
        numberToEject - the number of sessions to invalidate, or -1 for all sessions.
        applicationId - the application identifier to match for ejecting sessions. This string is provided to the Liberator by the connecting client.
        Returns:
        the number of sessions successfully ejected
      • ejectSessionsByMachineId

        int ejectSessionsByMachineId​(AuthenticationUser user,
                                     int numberToEject,
                                     java.lang.String machineId)
        Ejects one or more of a user's sessions based on machine identifier.
        Parameters:
        user - the AuthenticationUser instance whose sessions are to be ejected.
        numberToEject - the number of sessions to invalidate, or -1 for all sessions.
        machineId - the machine identifier to match for ejecting sessions. This string is provided to the Liberator by the connecting client and is typically the hostname.
        Returns:
        the number of sessions successfully ejected.
      • invalidateObject

        void invalidateObject​(java.lang.String objectName,
                              InvalidationType type)
        Performs invalidation of an object, affecting all users subscribed to it.

        Depending on the InvalidationType passed in, calls to mapObject and checkRead will be made for each object subscription.


        Parameters:
        objectName - the name of the object to invalidate
        type - the invalidation scheme to use (one of InvalidationType.READ or InvalidationType.READ_CHECK_OBJECT).
      • invalidateSessions

        void invalidateSessions​(AuthenticationUser user,
                                int numberToInvalidate,
                                InvalidationType type)
        Performs invalidation of all or a number of a user's sessions.

        Depending on the InvalidationType passed in, calls to mapObject and checkRead will be made for each object subscription.


        Parameters:
        user - the AuthenticationUser instance whose sessions are to be invalidated.
        numberToInvalidate - the number of sessions to invalidate, or -1 for all sessions.
        type - the invalidation scheme to use (one of InvalidationType.READ or InvalidationType.READ_CHECK_OBJECT).
      • invalidateAllSessions

        void invalidateAllSessions​(InvalidationType type)
        Provides the mechanism for invalidating all connected sessions.

        This method is useful when the whole set of user permissions has been updated and you need the Liberator to re-validate all sessions. Depending on the InvalidationType passed in, calls to mapObject and checkRead will be made for each object subscription.

        Parameters:
        type - the invalidation scheme to use (one of InvalidationType.READ or InvalidationType.READ_CHECK_OBJECT).
      • adjustThrottleForSession

        void adjustThrottleForSession​(UserSession session,
                                      ThrottleCommand command)
        Provides a mechanism to control the throttling level of all subscriptions of a session.

        This will adjust the throttle level for any future subscriptions during the life of this session and all current subscriptions (if they haven't had an overridden throttle level set using adjustThrottleForObject(UserSession, String, ThrottleCommand)).

        Parameters:
        session - the session to invoke the throttle command on.
        command - the throttling command to invoke.
      • adjustThrottleForObject

        void adjustThrottleForObject​(UserSession session,
                                     java.lang.String subscribedObjectName,
                                     ThrottleCommand command)
        Provides a mechanism to control the throttling level of a single subscription of a session.

        This will set the throttle level for a single object that is subscribed by a session.

        A call to this method will mean that this object will no longer be controlled by calls to adjustThrottleForSession(UserSession, ThrottleCommand), unless that call is issued using the ThrottleCommand.DEFAULT.

        Parameters:
        session - the session to invoke the throttle command on.
        subscribedObjectName - the subscription name of the object to be throttled.
        command - the throttling command to invoke.
      • verifySignatureUsername

        AuthenticationResult verifySignatureUsername​(java.lang.String username,
                                                     java.lang.String token)
        Provides a mechanism for verifying the username embedded within a KeyMaster token.
        Parameters:
        username - the username that we expect to be embedded within the token.
        token - a KeyMaster-generated encyrpted logon token.
        Returns:
        an AuthenticationResult instance - one of: