From 8263cdeb5719f0322c580bf4215dcd35db274c17 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 20 Oct 2015 06:57:15 -0700 Subject: [PATCH] Update "type auth.Challenge" comment example code This interface was changed in 4a2300aaa92156ef6388521c2b9eabeae4e3cf08, but the comment wasn't ever updated to match. Signed-off-by: Andrew "Tianon" Page --- docs/auth/auth.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/auth/auth.go b/docs/auth/auth.go index 862c8d28..b3bb580d 100644 --- a/docs/auth/auth.go +++ b/docs/auth/auth.go @@ -21,7 +21,9 @@ // if ctx, err := accessController.Authorized(ctx, access); err != nil { // if challenge, ok := err.(auth.Challenge) { // // Let the challenge write the response. -// challenge.ServeHTTP(w, r) +// challenge.SetHeaders(w) +// w.WriteHeader(http.StatusUnauthorized) +// return // } else { // // Some other error. // }