Take the Negroni code from example 2 and extend the code by adding a new middleware handler to validate authentication. This call must happen before processing anything else. If authentication fails return a 500 and cancel the processing of the request. If authentication succeeds finish processing the rest of the handlers. Use a query string to cause authentication to succeed or fail.