fix: hmacauth dependency licensing issue (#3253)

* fix: upstream licensing issue by adopting hmacauth library and changing asserting library for its test cases

Signed-off-by: Jan Larwig <jan@larwig.com>

* fix: golang code quality and linting issues for hmacauth

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
Jan Larwig
2025-11-09 20:14:54 +01:00
committed by GitHub
parent 082b49aaeb
commit fcf4e7947b
8 changed files with 551 additions and 9 deletions
+2 -2
View File
@@ -8,9 +8,9 @@ import (
"net/url"
"strings"
"github.com/mbland/hmacauth"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/middleware"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/authentication/hmacauth"
)
const (
@@ -86,7 +86,7 @@ func (h *httpUpstreamProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
// A scope should always be injected before this handler is called.
scope.Upstream = h.upstream
// TODO (@NickMeves) - Deprecate GAP-Signature & remove GAP-Auth
// TODO (@tuunit) - Deprecate GAP-Signature & remove GAP-Auth
if h.auth != nil {
req.Header.Set("GAP-Auth", rw.Header().Get("GAP-Auth"))
h.auth.SignRequest(req)