code: func (a *AuthMiddleware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  	baseContext := r.Context()
  	if baseContext == nil {
  		baseContext = context.TODO()
  	}
  	user, err := a.GetUser(r)
  	if err != nil {
  		trace.WriteError(w, err)
  		return
  	}
  
  	// determine authenticated user based on the request parameters
  	requestWithContext := r.WithContext(context.WithValue(baseContext, ContextUser, user))
  	a.Handler.ServeHTTP(w, requestWithContext)
  }
docs: // ServeHTTP serves HTTP requests