WSGI middleware to handle WebID authentication