public Set<String> getConnectionIdentifiers(UserData userData) {

        // Do not return any connections if empty or expired
        Map<String, UserData.Connection> connections = userData.getConnections();
        if (connections == null || userData.isExpired())
            return Collections.<String>emptySet();

        // Return all available connection identifiers
        return connections.keySet();

    }
Returns the identifiers of all connections readable by the user whose
data is given by the provided UserData object. If the provided UserData
is not expired, this will be the set of all connection identifiers
within the UserData. If the UserData is expired, this will be an empty
set.

@param userData
    All data associated with the user whose accessible connection
    identifiers are being retrieved.

@return
    A set containing the identifiers of all connections readable by the
    user whose data is given by the provided UserData object.
extensions/guacamole-auth-json/src/main/java/org/apache/guacamole/auth/json/user/UserDataService.java