fix(deps): update module github.com/lestrrat-go/jwx/v3 to v4
auth0mock / build (pull_request) Successful in 2m13s

Migrate to jwx v4 per MIGRATION.md:
- jwk.Import now generic; use jwk.Import[jwk.Key](raw)
- Set GOEXPERIMENT=jsonv2 (v4 uses encoding/json/v2)
This commit is contained in:
2026-04-22 10:18:21 +02:00
parent 92307d1466
commit c414d75c3d
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -6,6 +6,7 @@ ARG GITLAB_TOKEN
WORKDIR /build
ENV CGO_ENABLED=0
ENV GOPRIVATE=gitlab.com/unboundsoftware/*
ENV GOEXPERIMENT=jsonv2
COPY go.mod go.sum ./
RUN go mod download
+2 -2
View File
@@ -38,7 +38,7 @@ func NewJWTService(issuer, audience, adminClaim, emailClaim string) (*JWTService
}
// Create JWK from private key
key, err := jwk.Import(privateKey)
key, err := jwk.Import[jwk.Key](privateKey)
if err != nil {
return nil, fmt.Errorf("create JWK from private key: %w", err)
}
@@ -98,7 +98,7 @@ func (s *JWTService) SignToken(claims map[string]interface{}) (string, error) {
}
// Create JWK from private key for signing
key, err := jwk.Import(s.privateKey)
key, err := jwk.Import[jwk.Key](s.privateKey)
if err != nil {
return "", fmt.Errorf("create signing key: %w", err)
}