add auth-proxy-test

Adds the first auth proxy test. This sets up a front proxy ahead of the oauth/authorize endpoint and proves that you pass an X-Remote-User header to our requestheader authentication request handler, you get back a code.

@liggitt Probably of interest to you.
Even better, make it a non runnable example.


> On Nov 21, 2014, at 7:58 AM, David Eads <notifications@github.com> wrote:
> 
> In test/integration/basic_auth.go:
> 
> > +		return
> > +	}
> > +
> > +	r.Header.Add("X-Remote-User", user.(User).ID)
> > +	handler.proxier.ServeHTTP(w, r)
> > +}
> > +
> > +func NewXRemoteUserProxyingHandler(rawUrl string) http.Handler {
> > +	parsedUrl, _ := url.Parse(rawUrl)
> > +	proxier := httputil.NewSingleHostReverseProxy(parsedUrl)
> > +	// proxier.Transport = NewBasicAuthRoundTripper(http.DefaultTransport)
> > +	return &xRemoteUserProxyingHandler{proxier}
> > +}
> > +
> > +func main() {
> > +	challenger := NewBasicAuthChallenger("realm", []User{{"username", "password", "Brave Butcher", "cowardly_butcher@example.org"}}, NewIdenfityingHandler())
> It was a working example of how to wire the pieces together that happens to be compatible with the basic auth password validator that Jordan built. I've moved it to be part of the godoc.
> 
> —
> Reply to this email directly or view it on GitHub.
>