@Override
    protected void configure() {

        // Create the required DirectoryResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryResource<User, APIUser>>() {},
                    UserDirectoryResource.class
                )
                .build(new TypeLiteral<DirectoryResourceFactory<User, APIUser>>() {}));

        // Create the required DirectoryObjectResourceFactory implementation
        install(new FactoryModuleBuilder()
                .implement(
                    new TypeLiteral<DirectoryObjectResource<User, APIUser>>() {},
                    UserResource.class
                )
                .build(new TypeLiteral<DirectoryObjectResourceFactory<User, APIUser>>() {}));

        // Bind translator for converting between User and APIUser
        bind(new TypeLiteral<DirectoryObjectTranslator<User, APIUser>>() {})
                .to(UserObjectTranslator.class);

    }
Guice Module which configures injections required for handling User resources
via the REST API.
guacamole/src/main/java/org/apache/guacamole/rest/user/UserModule.java