From 63d7981fe68ee323e920e0c67f1f903d455cd413 Mon Sep 17 00:00:00 2001 From: Kevin Fox Date: Sun, 15 Dec 2024 08:12:44 -0800 Subject: [PATCH] Simplify change Signed-off-by: Kevin Fox --- support/oidc-discovery-provider/handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/support/oidc-discovery-provider/handler.go b/support/oidc-discovery-provider/handler.go index 299b06e0b8..14c51a9914 100644 --- a/support/oidc-discovery-provider/handler.go +++ b/support/oidc-discovery-provider/handler.go @@ -58,7 +58,7 @@ func (h *Handler) serveWellKnown(w http.ResponseWriter, r *http.Request) { var host string var path string var urlScheme string - var keysURL url.URL + var jwksURL url.URL if h.jwtIssuer != "" { jwtIssuerURL, _ := url.Parse(h.jwtIssuer) host = jwtIssuerURL.Host @@ -78,7 +78,7 @@ func (h *Handler) serveWellKnown(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusBadRequest) return } - keysURL = url.URL{ + jwksURL = url.URL{ Scheme: tmpURL.Scheme, Host: tmpURL.Host, Path: keysPath, @@ -88,7 +88,7 @@ func (h *Handler) serveWellKnown(w http.ResponseWriter, r *http.Request) { if h.allowInsecureScheme && r.TLS == nil && r.URL.Scheme != "https" { tmpURLScheme = "http" } - keysURL = url.URL{ + jwksURL = url.URL{ Scheme: tmpURLScheme, Host: r.Host, Path: "/keys", @@ -118,7 +118,7 @@ func (h *Handler) serveWellKnown(w http.ResponseWriter, r *http.Request) { IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` }{ Issuer: issuerURL.String(), - JWKSURI: keysURL.String(), + JWKSURI: jwksURL.String(), AuthorizationEndpoint: "", ResponseTypesSupported: []string{"id_token"},