Simplify auth.Challenge interface to SetHeaders

This removes the erroneous http.Handler interface in favor a simple SetHeaders
method that only operattes on the response. Several unnecessary uses of pointer
types were also fixed up.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
Stephen J Day 2015-07-23 19:39:56 -07:00
parent a1ce8d81f7
commit 4a2300aaa9
7 changed files with 28 additions and 27 deletions

View file

@ -21,7 +21,7 @@ func TestSillyAccessController(t *testing.T) {
if err != nil {
switch err := err.(type) {
case auth.Challenge:
err.ServeHTTP(w, r)
err.SetHeaders(w)
w.WriteHeader(http.StatusUnauthorized)
return
default: