update tests, forward failed basic auth to render correct error body

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-10-26 21:46:41 +01:00
parent 8e39d8b873
commit b288fae10a
5 changed files with 40 additions and 37 deletions

View File

@@ -99,8 +99,11 @@ func AccountUUID(opts ...Option) func(next http.Handler) http.Handler {
Iss: opt.OIDCIss,
}
} else {
// we are still forwarding the request, the service is responsible for rendering the error
// TODO or render a full blown ocs xml / json error response
next.ServeHTTP(w, r)
// tell client to reauthenticate
w.WriteHeader(http.StatusUnauthorized)
//w.WriteHeader(http.StatusUnauthorized)
return
}
} else {