func (m *Modifier) ModifyResponse(res *http.Response) error {
	ctx := martian.NewContext(res.Request)
	actx := auth.FromContext(ctx)
	err := m.resmod.ModifyResponse(res)
	if actx.Error() != nil {
		res.StatusCode = 403
		res.Status = http.StatusText(403)
	}
	return err
}
ModifyResponse runs resmod.ModifyResponse.

If an error is returned from resmod.ModifyResponse it is returned.
package ipauth
import (
	"net"
	"net/http"
	"github.com/google/martian/v3"
	"github.com/google/martian/v3/auth"
)
var noop = martian.Noop("ipauth.Modifier")
type Modifier struct {
	reqmod martian.RequestModifier
	resmod martian.ResponseModifier
}
func NewModifier() *Modifier {
	return &Modifier{
		reqmod: noop,
		resmod: noop,
	}
}
func (m *Modifier) SetRequestModifier(reqmod martian.RequestModifier) {
	if reqmod == nil {
		reqmod = noop
	}
	m.reqmod = reqmod
}
func (m *Modifier) SetResponseModifier(resmod martian.ResponseModifier) {
	if resmod == nil {
		resmod = noop
	}
	m.resmod = resmod
}
func (m *Modifier) ModifyRequest(req *http.Request) error {
	ctx := martian.NewContext(req)
	actx := auth.FromContext(ctx)
	ip, _, err := net.SplitHostPort(req.RemoteAddr)
	if err != nil {
		ip = req.RemoteAddr
	}
	actx.SetID(ip)
	err = m.reqmod.ModifyRequest(req)
	if actx.Error() != nil {
		ctx.SkipRoundTrip()
	}
	return err
}