jaredhanson/connect-ensure-login — pull request #3 by polkhovsky (2013-05-16 22:44:43+00:00)
Title: 401 status code instead of redirect when securing API

I added an option to send 401 (Unauthorized) instead of redirecting to '/login' by default. This should be useful for securing APIs when accessed by client-side script.