code: func (b basicAuth) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  	// Check if we have a user-provided error handler, else set a default
  	if b.opts.UnauthorizedHandler == nil {
  		b.opts.UnauthorizedHandler = http.HandlerFunc(defaultUnauthorizedHandler)
  	}
  
  	// Check that the provided details match
  	if b.authenticate(r) == false {
  		b.requestAuth(w, r)
  		return
  	}
  
  	// Call the next handler on success.
  	b.h.ServeHTTP(w, r)
  }
docs: // Satisfies the http.Handler interface for basicAuth.