digest auth: use RequireAuthStale when appropriate

This commit is contained in:
mpl 2020-03-25 14:28:04 +01:00 committed by GitHub
parent b54412e82e
commit 69de5bb828
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 23 deletions

View file

@ -49,7 +49,8 @@ func NewBasic(ctx context.Context, next http.Handler, authConfig dynamic.BasicAu
if len(authConfig.Realm) > 0 {
realm = authConfig.Realm
}
ba.auth = goauth.NewBasicAuthenticator(realm, ba.secretBasic)
ba.auth = &goauth.BasicAuth{Realm: realm, Secrets: ba.secretBasic}
return ba, nil
}