add missing www-authentication header on failed authentication
This commit is contained in:
@@ -87,6 +87,7 @@ func Authentication(auths []Authenticator, opts ...Option) func(next http.Handle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !isPublicPath(r.URL.Path) {
|
if !isPublicPath(r.URL.Path) {
|
||||||
|
writeSupportedAuthenticateHeader(w, r)
|
||||||
for _, s := range SupportedAuthStrategies {
|
for _, s := range SupportedAuthStrategies {
|
||||||
userAgentAuthenticateLockIn(w, r, options.CredentialsByUserAgent, s)
|
userAgentAuthenticateLockIn(w, r, options.CredentialsByUserAgent, s)
|
||||||
}
|
}
|
||||||
@@ -178,6 +179,7 @@ func userAgentAuthenticateLockIn(w http.ResponseWriter, r *http.Request, locks m
|
|||||||
for _, r := range ProxyWwwAuthenticate {
|
for _, r := range ProxyWwwAuthenticate {
|
||||||
evalRequestURI(u, r)
|
evalRequestURI(u, r)
|
||||||
}
|
}
|
||||||
|
fmt.Println(w.Header())
|
||||||
}
|
}
|
||||||
|
|
||||||
func evalRequestURI(l userAgentLocker, r regexp.Regexp) {
|
func evalRequestURI(l userAgentLocker, r regexp.Regexp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user