handlers and modules must be registered in the web.config, as it configuration for IIS.
the hack approach is for the library to read and update the web.config. but something would need to call the module. if using the owin pipeline, you could use a startup attribute.