public boolean isValid() {

        // Immediately return false if any user context is not valid
        return !userContexts.stream().anyMatch(
                userContext -> !userContext.isValid());
    }
Returns true if all user contexts associated with this session are
valid, or false if any user context is not valid. If a session is not
valid, it may no longer be used, and invalidate() should be invoked.
Invoking this function does not affect the last access time of this
session.

@return
    true if all user contexts associated with this session are
    valid, or false if any user context is not valid.
guacamole/src/main/java/org/apache/guacamole/GuacamoleSession.java