Oh wait, I see how the connect basicAuth works. Still, you could totally move this into lib/middleware