diff --git a/jwt/proxy_handlers.go b/jwt/proxy_handlers.go index 6955664..5357cfa 100644 --- a/jwt/proxy_handlers.go +++ b/jwt/proxy_handlers.go @@ -123,7 +123,7 @@ func NewJWTVerifierHandler(cfg config.VerifierConfig) (*StoppableProxyHandler, e handler := func(r *http.Request, ctx *goproxy.ProxyCtx) (*http.Request, *http.Response) { signedClaims, err := Verify(r, keyServer, nonceStorage, cfg.Audience.URL, cfg.MaxSkew, cfg.MaxTTL) if err != nil { - return r, goproxy.NewResponse(r, goproxy.ContentTypeText, http.StatusForbidden, fmt.Sprintf("jwtproxy: unable to verify request: %s", err)) + return r, goproxy.NewResponse(r, goproxy.ContentTypeText, http.StatusUnauthorized, fmt.Sprintf("jwtproxy: unable to verify request: %s", err)) } // Run through the claims verifiers.