public void init(String username) throws GuacamoleException {

        // Initialize the rootGroup to a QuickConnectionGroup with a
        // single root identifier.
        this.rootGroup = new QuickConnectionGroup(
            ROOT_IDENTIFIER,
            ROOT_IDENTIFIER
        );

        // Initialize the connection directory
        this.connectionDirectory.init(this.rootGroup);

        // Initialize the user to a SimpleUser with the provided username,
        // no connections, and the single root group.
        this.self = new SimpleUser(username) {

            @Override
            public ObjectPermissionSet getConnectionPermissions() throws GuacamoleException {
                return new SimpleObjectPermissionSet(connectionDirectory.getIdentifiers());
            }

            @Override
            public ObjectPermissionSet getConnectionGroupPermissions() throws GuacamoleException {
                return new SimpleObjectPermissionSet(Collections.singleton(ROOT_IDENTIFIER));
            }

        };

    }
Initialize a QuickConnectUserContext using the provided username.

@param username
    The name of the user logging in that will be associated
    with this UserContext.

@throws GuacamoleException
    If errors occur initializing the ConnectionGroup,
    ConnectionDirectory, or User.
extensions/guacamole-auth-quickconnect/src/main/java/org/apache/guacamole/auth/quickconnect/QuickConnectUserContext.java