Tune getting bearer token; prepare for passing through bearer token

This commit is contained in:
Pavel Korotkov 2020-07-20 20:23:16 +03:00
parent 3ff7028229
commit d9b146628d
7 changed files with 57 additions and 39 deletions

View file

@ -11,7 +11,7 @@ import (
func attachNewUserAuth(router *mux.Router, center *s3auth.Center, log *zap.Logger) {
uamw := func(h http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
_, err := center.AuthenticationPassed(r.Header)
_, err := center.AuthenticationPassed(r)
if err != nil {
log.Error("failed to pass authentication", zap.Error(err))
}