Simple middleware to basicauth resources with blocks.