Digest auth: reuse challenges across requests (#32842)

This commit is contained in:
andig 2026-08-21 17:32:25 +02:00 • committed by GitHub
parent 37d8aecbb2
commit c28f2ff623
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 247 additions and 17 deletions

View file

@ -8,7 +8,7 @@ import (
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/request"
"github.com/jpfielding/go-http-digest/pkg/digest"
"github.com/evcc-io/evcc/util/transport"
)
// Gen2API endpoint reference: https://shelly-api-docs.shelly.cloud/gen2/
@ -132,7 +132,7 @@ func newGen2(helper *request.Helper, uri, model string, channel int, user, passw
// Shelly gen 2 rfc7616 authentication
// https://shelly-api-docs.shelly.cloud/gen2/General/Authentication
if user != "" {
c.Client.Transport = digest.NewTransport(user, password, c.Client.Transport)
c.Client.Transport = transport.Digest(user, password, c.Client.Transport)
}
var res Gen2Methods