Merge pull request #1115 from tianon/fix-auth-servehttp-comment

Update "type auth.Challenge" comment example code
pull/1118/head
Stephen Day 2015-10-21 12:56:14 -07:00
commit e6bb0aa7c0
1 changed files with 3 additions and 1 deletions

View File

@ -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.
// }