In this challenge, you must implement an HTTP middleware in Go that checks each incoming request for a valid authentication token. If the token is invalid, the middleware should return an HTTP 401 Unauthorized response. If valid, it should pass the request to the next handler.
- The middleware looks for an HTTP header "X-Auth-Token".
- If the header is present and equals a predefined "secret", the request is allowed and should pass to the final handler.
- Otherwise, return 401 Unauthorized.
- The router has two endpoints:
- GET /hello -> returns "Hello!"
- GET /secure -> returns "You are authorized!"
- The included test file has 10 scenarios checking correct behavior for valid tokens, invalid tokens, missing headers, etc.