7e07eaa758
## Why `master` does not compile. Three PRs that each built individually combined badly: - #92 changed `fetchBearerToken` to return `(string, time.Duration, error)` and added `cachedBearerToken` (which hashes the challenge via `sha256Hash`). - #94 (streaming) removed the now-unused-in-that-PR `sha256Hash` helper and its `crypto/sha256` / `encoding/hex` imports. - #89 (HEAD) added `headUpstream`, which calls `fetchBearerToken` expecting two return values. Result on `master`: `internal/proxy/engine.go` fails to build (`assignment mismatch: 2 variables but fetchBearerToken returns 3 values`; `undefined: sha256Hash`). ## Changes - Re-add the `sha256Hash` helper and its `crypto/sha256` + `encoding/hex` imports. - Fix the `headUpstream` 401 path to handle `fetchBearerToken`s three return values. ## Validation - `go build ./...`, `go vet`, and `make e2e` all pass. Should merge before the other in-flight branches so they rebase onto a compiling `master`. Reviewed-on: #96 Co-authored-by: Ben Vincent <ben@unkin.net> Co-committed-by: Ben Vincent <ben@unkin.net>