ScienceUtsav interview question

What is Middleware, How do you authenticate user?