Merge pull request #1115 from tianon/fix-auth-servehttp-comment
Update "type auth.Challenge" comment example code
This commit is contained in:
commit
cc69dcca8d
1 changed files with 3 additions and 1 deletions
|
@ -21,7 +21,9 @@
|
||||||
// if ctx, err := accessController.Authorized(ctx, access); err != nil {
|
// if ctx, err := accessController.Authorized(ctx, access); err != nil {
|
||||||
// if challenge, ok := err.(auth.Challenge) {
|
// if challenge, ok := err.(auth.Challenge) {
|
||||||
// // Let the challenge write the response.
|
// // Let the challenge write the response.
|
||||||
// challenge.ServeHTTP(w, r)
|
// challenge.SetHeaders(w)
|
||||||
|
// w.WriteHeader(http.StatusUnauthorized)
|
||||||
|
// return
|
||||||
// } else {
|
// } else {
|
||||||
// // Some other error.
|
// // Some other error.
|
||||||
// }
|
// }
|
||||||
|
|
Loading…
Reference in a new issue